Removed /usr/local from CDPATH
[clearscm.git] / test / testcmdline.pl
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use FindBin;
6
7 use lib "$FindBin::Bin/../lib";
8
9 use CmdLine;
10 use Display;
11 use Term::ANSIColor qw (color);
12
13 my $me = $FindBin::Script;
14    $me =~ s/\.pl$//;
15
16 my $prompt = color ('BOLD CYAN') . "$me:" . color ('RESET');
17   
18 $CmdLine::cmdline->set_prompt ($prompt);
19
20 my ($line, $result);
21
22 while (($line, $result) = $CmdLine::cmdline->get) {
23   last unless defined $line;
24   last if $line =~ /exit|quit/i;
25   
26   display "Would have executed $line"
27     if $line !~ /^\s*$/;
28 } # while
29
30 display 'done';