1# Before `make install' is performed this script should be runnable with 2# `make test'. After `make install' it should work as `perl 1.t' 3 4######################### 5 6# change 'tests => 2' to 'tests => last_test_to_print'; 7 8use Test::More tests => 2; 9BEGIN { use_ok('Term::EditLine') }; 10 11 12my $fail = 0; 13foreach my $constname (qw( 14 CC_ARGHACK CC_CURSOR CC_EOF CC_ERROR CC_FATAL CC_NEWLINE CC_NORM 15 CC_REDISPLAY CC_REFRESH CC_REFRESH_BEEP EL_ADDFN EL_BIND 16 EL_BUILTIN_GETCFN EL_CLIENTDATA EL_ECHOTC EL_EDITMODE EL_EDITOR 17 EL_GETCFN EL_HIST EL_PROMPT EL_RPROMPT EL_SETTC EL_SETTY EL_SIGNAL 18 EL_TELLTC EL_TERMINAL H_ADD H_APPEND H_CLEAR H_CURR H_END H_ENTER 19 H_FIRST H_FUNC H_GETSIZE H_LAST H_LOAD H_NEXT H_NEXT_EVENT H_NEXT_STR 20 H_PREV H_PREV_EVENT H_PREV_STR H_SAVE H_SET H_SETSIZE)) { 21 next if (eval "my \$a = $constname; 1"); 22 if ($@ =~ /^Your vendor has not defined Term::EditLine macro $constname/) { 23 print "# pass: $@"; 24 } else { 25 print "# fail: $@"; 26 $fail = 1; 27 } 28 29} 30 31ok( $fail == 0 , 'Constants' ); 32######################### 33 34# Insert your test code below, the Test::More module is use()ed here so read 35# its man page ( perldoc Test::More ) for help writing this test script. 36 37