[Groonga-commit] droonga/drntest at 3e0f600 [master] Indent

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 19 17:01:52 JST 2014


Kouhei Sutou	2014-03-19 17:01:52 +0900 (Wed, 19 Mar 2014)

  New Revision: 3e0f600c2bfd402c77827bcf61f4f4b824f10b1c
  https://github.com/droonga/drntest/commit/3e0f600c2bfd402c77827bcf61f4f4b824f10b1c

  Message:
    Indent

  Modified files:
    lib/drntest/test-loader.rb

  Modified: lib/drntest/test-loader.rb (+25 -25)
===================================================================
--- lib/drntest/test-loader.rb    2014-03-19 17:01:31 +0900 (fd44cad)
+++ lib/drntest/test-loader.rb    2014-03-19 17:01:52 +0900 (d798bad)
@@ -47,35 +47,35 @@ module Drntest
       data = ""
       Pathname(path).open do |input|
         input.each_line do |line|
-        data << line
-        case line.chomp
-        when /\A\#\@([^\s]+)/
-          type = $1
-          options = Shellwords.split($POSTMATCH.strip)
-          directive = parse_directive(type, options)
-          case directive
-          when UnknownDirective
-            raise InputError.new(path, input.lineno, line,
-                                 "unknown directive: <#{directive.type}>")
-          when IncludeDirective
-            included = resolve_relative_path(directive.path)
-            included_operations = load_test_file(included)
-            operations += included_operations
+          data << line
+          case line.chomp
+          when /\A\#\@([^\s]+)/
+            type = $1
+            options = Shellwords.split($POSTMATCH.strip)
+            directive = parse_directive(type, options)
+            case directive
+            when UnknownDirective
+              raise InputError.new(path, input.lineno, line,
+                                   "unknown directive: <#{directive.type}>")
+            when IncludeDirective
+              included = resolve_relative_path(directive.path)
+              included_operations = load_test_file(included)
+              operations += included_operations
+            else
+              operations << directive
+            end
+          when /\A\#/
+            # comment
           else
-            operations << directive
-          end
-        when /\A\#/
-          # comment
-        else
-          begin
-            parser << line
-          rescue Yajl::ParseError => error
-            JSONLoader.report_error(path, data, error)
-            raise error
+            begin
+              parser << line
+            rescue Yajl::ParseError => error
+              JSONLoader.report_error(path, data, error)
+              raise error
+            end
           end
         end
       end
-      end
       operations
     end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index