Changeset 95414bf
- Timestamp:
- Jun 13, 2010, 7:53:22 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 8ab1f28, 63d9de9
- Parents:
- 22e02cd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
t/00-core-tests.t
r1cf3f8d3 r95414bf 1 1 #!/usr/bin/env perl 2 2 use File::Basename; 3 system(dirname($0) . "/../tester" );3 system(dirname($0) . "/../tester", "--builtin"); -
tester.c
r22e02cd r95414bf 26 26 int main(int argc, char **argv, char **env) 27 27 { 28 /* initialize a fake ncurses, detached from std{in,out} */ 29 FILE *rnull = fopen("/dev/null", "r"); 30 FILE *wnull = fopen("/dev/null", "w"); 28 FILE *rnull; 29 FILE *wnull; 31 30 char *perlerr; 32 31 int status = 0; 32 33 if (argc <= 1) { 34 fprintf(stderr, "Usage: %s --builtin|TEST.t|-le CODE\n", argv[0]); 35 return 1; 36 } 37 38 /* initialize a fake ncurses, detached from std{in,out} */ 39 wnull = fopen("/dev/null", "w"); 40 rnull = fopen("/dev/null", "r"); 33 41 newterm("xterm", wnull, rnull); 34 42 /* initialize global structures */ … … 52 60 owl_function_firstmsg(); 53 61 54 if (argc > 1) { 55 ENTER; 56 SAVETMPS; 57 58 if (strcmp(argv[1], "-le") == 0 && argc > 2) { 59 /* 60 * 'prove' runs its harness perl with '-le CODE' to get some 61 * information out. 62 */ 63 moreswitches("l"); 64 eval_pv(argv[2], true); 65 } else { 66 sv_setpv(get_sv("0", false), argv[1]); 67 sv_setpv(get_sv("main::test_prog", TRUE), argv[1]); 68 69 eval_pv("do $main::test_prog; die($@) if($@)", true); 70 } 71 72 status = 0; 73 74 FREETMPS; 75 LEAVE; 62 ENTER; 63 SAVETMPS; 64 65 if (strcmp(argv[1], "--builtin") == 0) { 66 status = owl_regtest(); 67 } else if (strcmp(argv[1], "-le") == 0 && argc > 2) { 68 /* 69 * 'prove' runs its harness perl with '-le CODE' to get some 70 * information out. 71 */ 72 moreswitches("l"); 73 eval_pv(argv[2], true); 76 74 } else { 77 status = owl_regtest(); 78 } 75 sv_setpv(get_sv("0", false), argv[1]); 76 sv_setpv(get_sv("main::test_prog", TRUE), argv[1]); 77 78 eval_pv("do $main::test_prog; die($@) if($@)", true); 79 } 80 81 status = 0; 82 83 FREETMPS; 84 LEAVE; 79 85 80 86 out:
Note: See TracChangeset
for help on using the changeset viewer.