Skip to content

Commit

Permalink
Merge pull request #961 from paultcochrane/ptc/debugger_errmsg_fix
Browse files Browse the repository at this point in the history
Add newline to parrot_debugger error message
  • Loading branch information
leto committed Apr 21, 2013
2 parents 606ac8e + 58457d1 commit 33583d1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,7 @@ t/postconfigure/05-trace.t [test]
t/postconfigure/06-data_get_PConfig_Temp.t [test]
t/profiling/profiling.t [test]
t/run/README.pod []doc
t/run/debugger_options.t [test]
t/run/exit.t [test]
t/run/options.t [test]
t/src/README.pod []doc
Expand Down
2 changes: 1 addition & 1 deletion frontend/parrot_debugger/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ main(int argc, const char *argv[])
const char * const ext = strrchr(filename, '.');

if (*filename == '-') {
fprintf(stderr, "parrot_debugger takes no -x or --xxxx flag arguments");
fprintf(stderr, "parrot_debugger takes no -x or --xxxx flag arguments\n");
exit(1);
}
else {
Expand Down
38 changes: 38 additions & 0 deletions t/run/debugger_options.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!perl
# Copyright (C) 2005-2013, Parrot Foundation.

=head1 NAME
t/run/debugger_options.t - test parrot debugger command line options
=head1 SYNOPSIS
% prove t/run/debugger_options.t
=head1 DESCRIPTION
Tests C<parrot_debugger> command line options.
=cut

use strict;
use warnings;
use lib qw( lib . ../lib ../../lib );

use Test::More tests => 1;
use Parrot::Config;
use IO::CaptureOutput qw{ qxx };

my $PARROT_DEBUGGER = ".$PConfig{slash}parrot_debugger";

# looking at the no flag arguments error message
my ( $stdout, $stderr, $success ) = qxx( "$PARROT_DEBUGGER --help" );
is( $stderr, "parrot_debugger takes no -x or --xxxx flag arguments\n",
'Debugger flag argument error message' );

# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:

0 comments on commit 33583d1

Please sign in to comment.