@@ -13,17 +13,38 @@ var execFile = require('child_process').execFile;
1313var suite = vows . describe ( 'cli' ) ;
1414
1515suite . addBatch ( {
16- 'sanity ' : {
16+ 'defaults ' : {
1717 topic : function ( ) {
1818 execFile ( path . join ( __dirname , '..' , 'bin' , 'cpplint' ) , [
1919 path . join ( __dirname , 'fixtures' , 'node-cpp-hello.cpp' )
2020 ] , null , this . callback ) ;
2121 } ,
2222
23- 'should run successfully' : function ( error , stdout , stderr ) {
24- assert . isNull ( error ) ;
23+ 'should run successfully' : function ( err , stdout , stderr ) {
24+ assert . isNull ( err ) ;
2525 assert . isString ( stdout ) ;
2626 assert . isEmpty ( stderr ) ;
27+ } ,
28+
29+ 'default verbosity is 1' : function ( err , stdout , stderr ) {
30+ var lines = stdout . split ( '\n' ) ;
31+ assert . lengthOf ( lines , 7 ) ;
32+ } ,
33+
34+ 'default reporter is spec' : function ( err , stdout , stderr ) {
35+ var lines = stdout . split ( '\n' ) ;
36+ assert . match ( lines [ 0 ] , / ✗ / ) ;
37+ assert . match ( lines [ 0 ] , / n o d e \- c p p \- h e l l o \. c p p / ) ;
38+ } ,
39+
40+ 'default filters is no filters' : function ( err , stdout , stderr ) {
41+ var lines = stdout . split ( '\n' ) ;
42+ assert . lengthOf ( lines , 7 ) ;
43+ } ,
44+
45+ 'default extensions is no extensions' : function ( err , stdout , stderr ) {
46+ var lines = stdout . split ( '\n' ) ;
47+ assert . lengthOf ( lines , 7 ) ;
2748 }
2849 }
2950} ) ;
0 commit comments