gl_nodir.t (556B)
1 # 2 # Check that citrun_gl outputs a good error message when $CITRUN_PROCDIR is bad. 3 # 4 use Modern::Perl; 5 use Test::More skip_all => 'not yet'; 6 7 8 9 my $gl = Test::Cmd->new( prog => 'gl/citrun_gl', workdir => '' ); 10 11 # Create a file in the exact place the directory is supposed to be. 12 $gl->write( 'procdir', '' ); 13 $gl->run( args => '/dev/null' ); 14 15 my $err_good = "citrun_gl: opendir 'procdir': Not a directory"; 16 isnt( $gl->stdout, '', 'is stdout not silent' ); 17 like( $gl->stderr, qr/$err_good/, 'is stderr silent' ); 18 is( $? >> 8, 1, 'is exit code nonzero' );