<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-14 14:59:47 +0900 (Tue, 14 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505">fd04225cbe7632d36832f695215f27cd5458e505</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">Extract raw output normalization code</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#diff-0">lib/grntest/tester.rb</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/grntest/tester.rb (+7 -4)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L937">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L938">938</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L939">939</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L940">940</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L941">941</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L942">942</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L943">943</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L944">944</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L945">945</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L946">946</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L947">947</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L948">948</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L949">949</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L954">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L955">955</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L956">956</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L957">957</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L958">958</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L959">959</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L960">960</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L961">961</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L962">962</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L963">963</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0L964">964</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R937">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R938">938</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R939">939</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R940">940</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R941">941</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R942">942</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R943">943</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R944">944</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R945">945</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R946">946</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R947">947</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R948">948</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R949">949</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R950">950</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R951">951</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R952">952</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R953">953</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R958">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R959">959</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R960">960</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R961">961</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R962">962</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R963">963</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R964">964</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R965">965</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R966">966</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grntest/commit/fd04225cbe7632d36832f695215f27cd5458e505#L0R967">967</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -938,12 +938,16 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">EOF</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> when :output</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> normalized_result << normalize_output(content, options)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> when :error</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- normalized_result << "#{content}\n".force_encoding("ASCII-8BIT")</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ normalized_result << normalize_raw_content(content)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> normalized_result</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ def normalize_raw_content(content)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "#{content}\n".force_encoding("ASCII-8BIT")</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ end</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> def normalize_output(content, options)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> type = options[:type]</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> case type</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -955,10 +959,9 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">EOF</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if normalized_output.bytesize > @max_n_columns</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> normalized_output = JSON.pretty_generate(normalized_output_content)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- normalized_output.force_encoding("ASCII-8BIT")</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- "#{normalized_output}\n"</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ normalize_raw_content(normalized_output)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> else</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- "#{content}\n".force_encoding("ASCII-8BIT")</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ normalize_raw_content(content)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>