996
|
1 < v ,a = v# "echo 'Hi there (and now a ls):'; ls" 0
|
|
2 > 0a"detcelfer =" >:#,_@
|
|
3 > 0" :)0 eb dluohs( lavteR" >:#,_ $ . a, v
|
|
4
|
|
5 v ,a = "echo 'Will run: exit 2'; exit 2" 0 <
|
|
6 > 0" :)2 eb dluohs( lavteR" >:#,_ $ . a,v
|
|
7 v <
|
|
8 >n #v=v
|
|
9 > na".gnirts htgnel orez no detcelfer = :DAB">:#,_@
|
|
10 >v
|
|
11 >02-w na".gnirts htgnel orez no 2- dehsup = :DOOG">:#,_@
|
|
12 >> na"gnirts htgnel orez no 2- hsup t'ndid = :DAB">:#,_@
|
|
13
|
|
14 This program should ouput (on a POSIX system):
|
|
15 Hi there (and now a ls):
|
|
16 <list of files in current directory, as ls outputs it>
|
|
17
|
|
18 Retval (should be 0): 0
|
|
19 Will run: exit 2
|
|
20
|
|
21 Retval (should be 2): 2
|
|
22 GOOD: = pushed -2 on zero length string.
|
|
23 There should be no indention in the output. (It was done here for clarity.)
|
|
24 The blank lines should match.
|
|
25
|
|
26 The last test (value on zero length string) is implementation defined, but
|
|
27 cfunge is supposed to push -2. Other implementations may push other values
|
|
28 (even 0).
|