[Groonga-commit] groonga/gcs [master] Fix broken command gcs-configure-fields

Back to archive index

SHIMODA Hiroshi null+****@clear*****
Mon Aug 13 18:49:09 JST 2012


SHIMODA Hiroshi	2012-08-13 18:49:09 +0900 (Mon, 13 Aug 2012)

  New Revision: 788afacee7197887f92db50025324cabb2b501eb
  https://github.com/groonga/gcs/commit/788afacee7197887f92db50025324cabb2b501eb

  Log:
    Fix broken command gcs-configure-fields

  Modified files:
    bin/gcs-configure-fields
    test/gcs-commands.test.js

  Modified: bin/gcs-configure-fields (+2 -2)
===================================================================
--- bin/gcs-configure-fields    2012-08-13 18:35:03 +0900 (d7f8463)
+++ bin/gcs-configure-fields    2012-08-13 18:49:09 +0900 (5c44f12)
@@ -66,10 +66,10 @@ if (commandLine.options.delete) {
         case 'result':   field.resultEnabled = true;  break;
         case 'noresult': field.resultEnabled = false; break;
         default:
-          thro new Error('invalid field option ' + commandLine.options.option);
+          throw new Error('invalid field option ' + commandLine.options.option);
       }
     } catch(error) {
-      console.log(error.message);
+      console.log((error.message || error).toString());
       return process.exit(1);
     }
   }

  Modified: test/gcs-commands.test.js (+3 -3)
===================================================================
--- test/gcs-commands.test.js    2012-08-13 18:35:03 +0900 (1333041)
+++ test/gcs-commands.test.js    2012-08-13 18:49:09 +0900 (99a0124)
@@ -536,7 +536,7 @@ suite('gcs-configure-fields', function() {
       });
   }
 
-  test('change option of text field', function() {
+  test('change option of text field', function(done) {
     testConfigureFieldOptions('text', {
       search:   'error',
       nosearch: 'error',
@@ -547,7 +547,7 @@ suite('gcs-configure-fields', function() {
     }, done);
   });
 
-  test('change option of uint field', function() {
+  test('change option of uint field', function(done) {
     testConfigureFieldOptions('uint', {
       search:   'error',
       nosearch: 'error',
@@ -558,7 +558,7 @@ suite('gcs-configure-fields', function() {
     }, done);
   });
 
-  test('change option of literal field', function() {
+  test('change option of literal field', function(done) {
     testConfigureFieldOptions('literal', {
       search:   'Search',
       nosearch: '',
-------------- next part --------------
HTML����������������������������...
Download 



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