home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / mac-perl / mcprl401.bin / Perl_appl / t / TEST < prev    next >
MacBinary  |  1992-01-20  |  2.6 KB  |  [TEXT/□□□□]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file TTComp archive data, binary, 1K dictionary default (weak)
99% file MacBinary II, Sun Jan 19 23:27:39 1992, modified Sun Jan 19 23:27:39 1992, type ASCII, 1997 bytes "TEST" default (weak)
98% file a ./perl script executable (binary data), at 0x84d 428 bytes resource default (weak)
97% file a ./perl script executable (binary data) default (weak)
96% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-1K) default (weak)
16% TrID MacBinary 2 default (weak)
0% TrID Sybase iAnywhere database files default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[□□□□]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 04 54 45 53 54 00 00 | 00 00 00 00 00 00 00 00 |..TEST..|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 00 00 00 | 00 00 00 00 00 00 00 00 |.TEXT...|........|
|00000050| 00 00 00 00 00 07 cd 00 | 00 01 ac a5 a0 00 3b a5 |........|......;.|
|00000060| a0 00 3b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..;.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c6 f4 00 00 |........|........|
|00000080| 23 21 2e 2f 70 65 72 6c | 0d 09 0d 23 20 24 52 43 |#!./perl|...# $RC|
|00000090| 53 66 69 6c 65 3a 20 54 | 45 53 54 2c 76 20 24 24 |Sfile: T|EST,v $$|
|000000a0| 52 65 76 69 73 69 6f 6e | 3a 20 34 2e 30 2e 31 2e |Revision|: 4.0.1.|
|000000b0| 31 20 24 24 44 61 74 65 | 3a 20 39 31 2f 30 36 2f |1 $$Date|: 91/06/|
|000000c0| 30 37 20 31 31 3a 35 39 | 3a 33 30 20 24 0d 0d 23 |07 11:59|:30 $..#|
|000000d0| 20 54 68 69 73 20 69 73 | 20 77 72 69 74 74 65 6e | This is| written|
|000000e0| 20 69 6e 20 61 20 70 65 | 63 75 6c 69 61 72 20 73 | in a pe|culiar s|
|000000f0| 74 79 6c 65 2c 20 73 69 | 6e 63 65 20 77 65 27 72 |tyle, si|nce we'r|
|00000100| 65 20 74 72 79 69 6e 67 | 20 74 6f 20 61 76 6f 69 |e trying| to avoi|
|00000110| 64 0d 23 20 6d 6f 73 74 | 20 6f 66 20 74 68 65 20 |d.# most| of the |
|00000120| 63 6f 6e 73 74 72 75 63 | 74 73 20 77 65 27 6c 6c |construc|ts we'll|
|00000130| 20 62 65 20 74 65 73 74 | 69 6e 67 20 66 6f 72 2e | be test|ing for.|
|00000140| 0d 0d 24 7c 20 3d 20 31 | 3b 0d 0d 69 66 20 28 24 |..$| = 1|;..if ($|
|00000150| 41 52 47 56 5b 30 5d 20 | 65 71 20 27 2d 76 27 29 |ARGV[0] |eq '-v')|
|00000160| 20 7b 0d 20 20 20 20 24 | 76 65 72 62 6f 73 65 20 | {. $|verbose |
|00000170| 3d 20 31 3b 0d 20 20 20 | 20 73 68 69 66 74 3b 0d |= 1;. | shift;.|
|00000180| 7d 0d 0d 63 68 64 69 72 | 20 27 74 27 20 69 66 20 |}..chdir| 't' if |
|00000190| 2d 66 20 27 3a 74 3a 54 | 45 53 54 27 3b 0d 0d 69 |-f ':t:T|EST';..i|
|000001a0| 66 20 28 24 41 52 47 56 | 5b 30 5d 20 65 71 20 27 |f ($ARGV|[0] eq '|
|000001b0| 27 29 20 7b 0d 20 20 20 | 20 40 41 52 47 56 20 3d |') {. | @ARGV =|
|000001c0| 20 73 70 6c 69 74 28 2f | 5b 20 5c 6e 5d 2f 2c 0d | split(/|[ \n]/,.|
|000001d0| 20 20 20 20 20 20 60 65 | 63 68 6f 20 3a 62 61 73 | `e|cho :bas|
|000001e0| 65 3a c5 2e 74 20 3a 63 | 6f 6d 70 3a c5 2e 74 20 |e:..t :c|omp:..t |
|000001f0| 3a 63 6d 64 3a c5 2e 74 | 20 3a 69 6f 3a c5 2e 74 |:cmd:..t| :io:..t|
|00000200| 3b 20 65 63 68 6f 20 3a | 6f 70 3a c5 2e 74 20 3a |; echo :|op:..t :|
|00000210| 6c 69 62 3a c5 2e 74 60 | 29 3b 0d 7d 0d 0d 6f 70 |lib:..t`|);.}..op|
|00000220| 65 6e 28 43 4f 4e 46 49 | 47 2c 22 3a 3a 63 6f 6e |en(CONFI|G,"::con|
|00000230| 66 69 67 2e 73 68 22 29 | 3b 0d 77 68 69 6c 65 20 |fig.sh")|;.while |
|00000240| 28 3c 43 4f 4e 46 49 47 | 3e 29 20 7b 0d 20 20 20 |(<CONFIG|>) {. |
|00000250| 20 69 66 20 28 2f 73 68 | 61 72 70 62 61 6e 67 3d | if (/sh|arpbang=|
|00000260| 27 28 2e 2a 29 27 2f 29 | 20 7b 0d 09 24 73 68 61 |'(.*)'/)| {..$sha|
|00000270| 72 70 62 61 6e 67 20 3d | 20 28 24 31 20 65 71 20 |rpbang =| ($1 eq |
|00000280| 27 23 21 27 29 3b 0d 09 | 6c 61 73 74 3b 0d 20 20 |'#!');..|last;. |
|00000290| 20 20 7d 0d 7d 0d 24 62 | 61 64 20 3d 20 30 3b 0d | }.}.$b|ad = 0;.|
|000002a0| 77 68 69 6c 65 20 28 24 | 74 65 73 74 20 3d 20 73 |while ($|test = s|
|000002b0| 68 69 66 74 29 20 7b 0d | 20 20 20 20 69 66 20 28 |hift) {.| if (|
|000002c0| 24 74 65 73 74 20 3d 7e | 20 2f 5e 24 2f 29 20 7b |$test =~| /^$/) {|
|000002d0| 0d 09 6e 65 78 74 3b 0d | 20 20 20 20 7d 0d 20 20 |..next;.| }. |
|000002e0| 20 20 24 74 65 20 3d 20 | 24 74 65 73 74 3b 0d 20 | $te = |$test;. |
|000002f0| 20 20 20 63 68 6f 70 28 | 24 74 65 29 3b 0d 20 20 | chop(|$te);. |
|00000300| 20 20 70 72 69 6e 74 20 | 22 24 74 65 22 20 2e 20 | print |"$te" . |
|00000310| 27 2e 27 20 78 20 28 31 | 35 20 2d 20 6c 65 6e 67 |'.' x (1|5 - leng|
|00000320| 74 68 28 24 74 65 29 29 | 3b 0d 20 20 20 20 69 66 |th($te))|;. if|
|00000330| 20 28 24 73 68 61 72 70 | 62 61 6e 67 29 20 7b 0d | ($sharp|bang) {.|
|00000340| 09 6f 70 65 6e 28 72 65 | 73 75 6c 74 73 2c 22 3a |.open(re|sults,":|
|00000350| 24 74 65 73 74 7c 22 29 | 20 7c 7c 20 28 70 72 69 |$test|")| || (pri|
|00000360| 6e 74 20 22 63 61 6e 27 | 74 20 72 75 6e 2e 5c 6e |nt "can'|t run.\n|
|00000370| 22 29 3b 0d 20 20 20 20 | 7d 20 65 6c 73 65 20 7b |");. |} else {|
|00000380| 0d 09 6f 70 65 6e 28 73 | 63 72 69 70 74 2c 22 24 |..open(s|cript,"$|
|00000390| 74 65 73 74 22 29 20 7c | 7c 20 64 69 65 20 22 43 |test") ||| die "C|
|000003a0| 61 6e 27 74 20 72 75 6e | 20 24 74 65 73 74 2e 5c |an't run| $test.\|
|000003b0| 6e 22 3b 0d 09 24 5f 20 | 3d 20 3c 73 63 72 69 70 |n";..$_ |= <scrip|
|000003c0| 74 3e 3b 0d 09 63 6c 6f | 73 65 28 73 63 72 69 70 |t>;..clo|se(scrip|
|000003d0| 74 29 3b 0d 09 69 66 20 | 28 2f 23 21 2e 2e 70 65 |t);..if |(/#!..pe|
|000003e0| 72 6c 28 2e 2a 29 2f 29 | 20 7b 0d 09 20 20 20 20 |rl(.*)/)| {.. |
|000003f0| 24 73 77 69 74 63 68 20 | 3d 20 24 31 3b 0d 09 7d |$switch |= $1;..}|
|00000400| 20 65 6c 73 65 20 7b 0d | 09 20 20 20 20 24 73 77 | else {.|. $sw|
|00000410| 69 74 63 68 20 3d 20 27 | 27 3b 0d 09 7d 0d 09 6f |itch = '|';..}..o|
|00000420| 70 65 6e 28 72 65 73 75 | 6c 74 73 2c 22 70 65 72 |pen(resu|lts,"per|
|00000430| 6c 24 73 77 69 74 63 68 | 20 24 74 65 73 74 7c 22 |l$switch| $test|"|
|00000440| 29 20 7c 7c 20 28 70 72 | 69 6e 74 20 22 63 61 6e |) || (pr|int "can|
|00000450| 27 74 20 72 75 6e 2e 5c | 6e 22 29 3b 0d 20 20 20 |'t run.\|n");. |
|00000460| 20 7d 0d 20 20 20 20 24 | 6f 6b 20 3d 20 30 3b 0d | }. $|ok = 0;.|
|00000470| 20 20 20 20 24 6e 65 78 | 74 20 3d 20 30 3b 0d 20 | $nex|t = 0;. |
|00000480| 20 20 20 77 68 69 6c 65 | 20 28 3c 72 65 73 75 6c | while| (<resul|
|00000490| 74 73 3e 29 20 7b 0d 09 | 69 66 20 28 24 76 65 72 |ts>) {..|if ($ver|
|000004a0| 62 6f 73 65 29 20 7b 0d | 09 20 20 20 20 70 72 69 |bose) {.|. pri|
|000004b0| 6e 74 20 24 5f 3b 0d 09 | 7d 0d 09 75 6e 6c 65 73 |nt $_;..|}..unles|
|000004c0| 73 20 28 2f 5e 23 2f 29 | 20 7b 0d 09 20 20 20 20 |s (/^#/)| {.. |
|000004d0| 69 66 20 28 2f 5e 31 5c | 2e 5c 2e 28 5b 30 2d 39 |if (/^1\|.\.([0-9|
|000004e0| 5d 2b 29 2f 29 20 7b 0d | 09 09 24 6d 61 78 20 3d |]+)/) {.|..$max =|
|000004f0| 20 24 31 3b 0d 09 09 24 | 74 6f 74 6d 61 78 20 2b | $1;...$|totmax +|
|00000500| 3d 20 24 6d 61 78 3b 0d | 09 09 24 66 69 6c 65 73 |= $max;.|..$files|
|00000510| 20 2b 3d 20 31 3b 0d 09 | 09 24 6e 65 78 74 20 3d | += 1;..|.$next =|
|00000520| 20 31 3b 0d 09 09 24 6f | 6b 20 3d 20 31 3b 0d 09 | 1;...$o|k = 1;..|
|00000530| 20 20 20 20 7d 20 65 6c | 73 65 20 7b 0d 09 09 24 | } el|se {...$|
|00000540| 6e 65 78 74 20 3d 20 24 | 31 2c 20 24 6f 6b 20 3d |next = $|1, $ok =|
|00000550| 20 30 2c 20 6c 61 73 74 | 20 69 66 20 2f 5e 6e 6f | 0, last| if /^no|
|00000560| 74 20 6f 6b 20 28 5b 30 | 2d 39 5d 2a 29 2f 3b 0d |t ok ([0|-9]*)/;.|
|00000570| 09 09 69 66 20 28 2f 5e | 6f 6b 20 28 2e 2a 29 2f |..if (/^|ok (.*)/|
|00000580| 20 26 26 20 24 31 20 3d | 3d 20 24 6e 65 78 74 29 | && $1 =|= $next)|
|00000590| 20 7b 0d 09 09 20 20 20 | 20 24 6e 65 78 74 20 3d | {... | $next =|
|000005a0| 20 24 6e 65 78 74 20 2b | 20 31 3b 0d 09 09 7d 20 | $next +| 1;...} |
|000005b0| 65 6c 73 65 20 7b 0d 09 | 09 20 20 20 20 24 6f 6b |else {..|. $ok|
|000005c0| 20 3d 20 30 3b 0d 09 09 | 7d 0d 09 20 20 20 20 7d | = 0;...|}.. }|
|000005d0| 0d 09 7d 0d 20 20 20 20 | 7d 0d 20 20 20 20 24 6e |..}. |}. $n|
|000005e0| 65 78 74 20 3d 20 24 6e | 65 78 74 20 2d 20 31 3b |ext = $n|ext - 1;|
|000005f0| 0d 20 20 20 20 69 66 20 | 28 24 6f 6b 20 26 26 20 |. if |($ok && |
|00000600| 24 6e 65 78 74 20 3d 3d | 20 24 6d 61 78 29 20 7b |$next ==| $max) {|
|00000610| 0d 09 70 72 69 6e 74 20 | 22 6f 6b 5c 6e 22 3b 0d |..print |"ok\n";.|
|00000620| 20 20 20 20 7d 20 65 6c | 73 65 20 7b 0d 09 24 6e | } el|se {..$n|
|00000630| 65 78 74 20 2b 3d 20 31 | 3b 0d 09 70 72 69 6e 74 |ext += 1|;..print|
|00000640| 20 22 46 41 49 4c 45 44 | 20 6f 6e 20 74 65 73 74 | "FAILED| on test|
|00000650| 20 24 6e 65 78 74 5c 6e | 22 3b 0d 09 24 62 61 64 | $next\n|";..$bad|
|00000660| 20 3d 20 24 62 61 64 20 | 2b 20 31 3b 0d 09 24 5f | = $bad |+ 1;..$_|
|00000670| 20 3d 20 24 74 65 73 74 | 3b 0d 09 69 66 20 28 2f | = $test|;..if (/|
|00000680| 5e 62 61 73 65 2f 29 20 | 7b 0d 09 20 20 20 20 64 |^base/) |{.. d|
|00000690| 69 65 20 22 46 61 69 6c | 65 64 20 61 20 62 61 73 |ie "Fail|ed a bas|
|000006a0| 69 63 20 74 65 73 74 2d | 2d 63 61 6e 6e 6f 74 20 |ic test-|-cannot |
|000006b0| 63 6f 6e 74 69 6e 75 65 | 2e 5c 6e 22 3b 0d 09 7d |continue|.\n";..}|
|000006c0| 0d 20 20 20 20 7d 0d 7d | 0d 0d 69 66 20 28 24 62 |. }.}|..if ($b|
|000006d0| 61 64 20 3d 3d 20 30 29 | 20 7b 0d 20 20 20 20 69 |ad == 0)| {. i|
|000006e0| 66 20 28 24 6f 6b 29 20 | 7b 0d 09 70 72 69 6e 74 |f ($ok) |{..print|
|000006f0| 20 22 41 6c 6c 20 74 65 | 73 74 73 20 73 75 63 63 | "All te|sts succ|
|00000700| 65 73 73 66 75 6c 2e 5c | 6e 22 3b 0d 20 20 20 20 |essful.\|n";. |
|00000710| 7d 20 65 6c 73 65 20 7b | 0d 09 64 69 65 20 22 46 |} else {|..die "F|
|00000720| 41 49 4c 45 44 2d 2d 6e | 6f 20 74 65 73 74 73 20 |AILED--n|o tests |
|00000730| 77 65 72 65 20 72 75 6e | 20 66 6f 72 20 73 6f 6d |were run| for som|
|00000740| 65 20 72 65 61 73 6f 6e | 2e 5c 6e 22 3b 0d 20 20 |e reason|.\n";. |
|00000750| 20 20 7d 0d 7d 20 65 6c | 73 65 20 7b 0d 20 20 20 | }.} el|se {. |
|00000760| 20 69 66 20 28 24 62 61 | 64 20 3d 3d 20 31 29 20 | if ($ba|d == 1) |
|00000770| 7b 0d 09 64 69 65 20 22 | 46 61 69 6c 65 64 20 31 |{..die "|Failed 1|
|00000780| 20 74 65 73 74 2e 5c 6e | 22 3b 0d 20 20 20 20 7d | test.\n|";. }|
|00000790| 20 65 6c 73 65 20 7b 0d | 09 64 69 65 20 22 46 61 | else {.|.die "Fa|
|000007a0| 69 6c 65 64 20 24 62 61 | 64 20 74 65 73 74 73 2e |iled $ba|d tests.|
|000007b0| 5c 6e 22 3b 0d 20 20 20 | 20 7d 0d 7d 0d 28 24 75 |\n";. | }.}.($u|
|000007c0| 73 65 72 2c 24 73 79 73 | 2c 24 63 75 73 65 72 2c |ser,$sys|,$cuser,|
|000007d0| 24 63 73 79 73 29 20 3d | 20 74 69 6d 65 73 3b 0d |$csys) =| times;.|
|000007e0| 70 72 69 6e 74 20 73 70 | 72 69 6e 74 66 28 22 75 |print sp|rintf("u|
|000007f0| 3d 25 67 20 20 73 3d 25 | 67 20 20 63 75 3d 25 67 |=%g s=%|g cu=%g|
|00000800| 20 20 63 73 3d 25 67 20 | 20 66 69 6c 65 73 3d 25 | cs=%g | files=%|
|00000810| 64 20 20 74 65 73 74 73 | 3d 25 64 5c 6e 22 2c 0d |d tests|=%d\n",.|
|00000820| 20 20 20 20 24 75 73 65 | 72 2c 24 73 79 73 2c 24 | $use|r,$sys,$|
|00000830| 63 75 73 65 72 2c 24 63 | 73 79 73 2c 24 66 69 6c |cuser,$c|sys,$fil|
|00000840| 65 73 2c 24 74 6f 74 6d | 61 78 29 3b 0d 00 00 00 |es,$totm|ax);....|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00000890| 00 00 11 63 0e 73 75 6e | 6f 73 5f 34 5f 30 5f 32 |...c.sun|os_4_0_2|
|000008a0| 2e 73 68 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.sh.....|........|
|000008b0| 04 54 45 53 54 80 02 00 | 00 00 54 45 58 54 00 00 |.TEST...|..TEXT..|
|000008c0| 00 00 00 00 ff ff ff ff | 00 00 00 00 75 ca 00 00 |........|....u...|
|000008d0| 00 00 54 45 58 54 00 00 | 00 00 00 00 ff ff ff ff |..TEXT..|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 a5 8c 0c 01 00 00 | 07 cd 00 00 01 ac 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 cc 25 00 00 00 |........|....%...|
|00000910| 11 64 08 63 6f 6e 66 69 | 67 2e 68 00 00 00 00 00 |.d.confi|g.h.....|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 d0 25 00 | 00 00 11 64 02 65 67 00 |......%.|...d.eg.|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 02 0f |........|........|
|00000960| 25 00 00 00 11 64 05 6f | 73 32 2e 63 00 00 00 00 |%....d.o|s2.c....|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 74 65 3a |...H..Mo|naco.te:|
|00000990| 20 39 31 2f 30 36 2f 30 | 37 20 31 31 3a 35 39 3a | 91/06/0|7 11:59:|
|000009a0| 33 30 20 24 0d 0d 00 06 | 00 08 00 3c 00 24 01 dd |30 $....|...<.$..|
|000009b0| 02 3d 00 3c 00 24 01 dd | 02 3d a5 9f c7 fb 00 00 |.=.<.$..|.=......|
|000009c0| 00 09 00 00 00 09 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|000009d0| 00 3c 00 24 01 dd 02 3d | 00 3c 00 24 01 dd 02 3d |.<.$...=|.<.$...=|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 31 |.....n..|.n...>.1|
|00000a00| b0 d4 0c 20 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |... ....|.>..MPSR|
|00000a10| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 03 f0 ff ff 00 00 00 4c | 00 37 e3 dc 00 00 00 00 |.......L|.7......|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+