[Groonga-commit] groonga/grntest [master] Add omit directive

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Nov 21 15:16:50 JST 2012


Kouhei Sutou	2012-11-21 15:16:50 +0900 (Wed, 21 Nov 2012)

  New Revision: 541c8d9bd2778793e8aff6e59bd703adb857d72c
  https://github.com/groonga/grntest/commit/541c8d9bd2778793e8aff6e59bd703adb857d72c

  Log:
    Add omit directive

  Modified files:
    README.md
    lib/grntest/tester.rb

  Modified: README.md (+18 -0)
===================================================================
--- README.md    2012-11-21 14:41:33 +0900 (5c2e5d6)
+++ README.md    2012-11-21 15:16:50 +0900 (adfd019)
@@ -409,6 +409,24 @@ register tokenizers/kytea
 #@on-error default
 ```
 
+### `omit`
+
+Usage:
+
+```
+#@omit REASON
+```
+
+Omit the test with `REASON`.
+
+Example:
+
+```
+# Omit this test until the feature is implemented.
+#@omit "This feature is not implemented yet."
+new_excelent_command
+```
+
 ## Options
 
 Grntest has many options. You don't need to specify many of them

  Modified: lib/grntest/tester.rb (+9 -0)
===================================================================
--- lib/grntest/tester.rb    2012-11-21 14:41:33 +0900 (c9ed370)
+++ lib/grntest/tester.rb    2012-11-21 15:16:50 +0900 (8f467d5)
@@ -1413,6 +1413,13 @@ EOF
         end
       end
 
+      def execute_directive_omit(line, content, options)
+        reason, = options
+        @output_type = "raw"
+        log_output("omit: #{reason}")
+        @context.omit
+      end
+
       def execute_directive(line, content)
         command, *options = Shellwords.split(content)
         case command
@@ -1430,6 +1437,8 @@ EOF
           execute_directive_long_timeout(line, content, options)
         when "on-error"
           execute_directive_on_error(line, content, options)
+        when "omit"
+          execute_directive_omit(line, content, options)
         else
           log_input(line)
           log_error("#|e| unknown directive: <#{command}>")
-------------- next part --------------
HTML����������������������������...
下载 



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