File tree Expand file tree Collapse file tree 5 files changed +32
-1
lines changed Expand file tree Collapse file tree 5 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1+ const CliTest = require ( "command-line-test" ) ;
2+
3+ describe ( "test" , function ( ) {
4+ it ( "shows help" , function * ( ) {
5+ const cliTest = new CliTest ( ) ;
6+ const res = yield cliTest . exec ( "../_build/default/bin/Extract.exe -help" ) ;
7+ expect ( res . stdout ) . toEqual (
8+ "Usage: ../_build/default/bin/Extract.exe directory ...\n -v shows the program version\n -help Display this list of options\n --help Display this list of options"
9+ ) ;
10+ } ) ;
11+
12+ it ( "shows version" , function * ( ) {
13+ const cliTest = new CliTest ( ) ;
14+ const res = yield cliTest . exec ( "../_build/default/bin/Extract.exe -v" ) ;
15+ expect ( res . stdout ) . toEqual ( "0.4.0" ) ;
16+ } ) ;
17+ } ) ;
Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ const expectedJson = [
2121 id : "test1.msg2.2" ,
2222 defaultMessage : "This is message 2.2" ,
2323 description : "Description for message 2.2"
24+ } ,
25+ {
26+ id : "test2.msg1.1" ,
27+ defaultMessage : "This is message 2.1.1"
2428 }
2529] ;
2630
2731describe ( "test" , function ( ) {
2832 it ( "extracts messages" , function * ( ) {
2933 const cliTest = new CliTest ( ) ;
30- const res = yield cliTest . exec ( "../_build/default/bin/Extract.exe test1" ) ;
34+ const res = yield cliTest . exec (
35+ "../_build/default/bin/Extract.exe test1 test2"
36+ ) ;
3137 expect ( JSON . parse ( res . stdout ) ) . toEqual ( expectedJson ) ;
3238 } ) ;
3339} ) ;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ let _ =
2+ [@ intl . messages ]
3+ {
4+ "test2.msg1.1" : {
5+ "id" : "test2.msg1.1" ,
6+ "defaultMessage" : "This is message 2.1.1" ,
7+ },
8+ };
You can’t perform that action at this time.
0 commit comments