Mercurial > repo
view interps/cfunge/cfunge-src/tests/sysexec.b98 @ 12500:e48c08805365 draft default tip
<b_jonas> ` learn \'The password of the month is Cthulhuquagdonic Mothraquagdonic Narwhalicorn.\' # https://logs.esolangs.org/libera-esolangs/2024-04.html#lKE Infinite craft
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Wed, 01 May 2024 06:39:10 +0000 |
parents | 859f9b4339e6 |
children |
line wrap: on
line source
< v ,a = v# "echo 'Hi there (and now a ls):'; ls" 0 > 0a"detcelfer =" >:#,_@ > 0" :)0 eb dluohs( lavteR" >:#,_ $ . a, v v ,a = "echo 'Will run: exit 2'; exit 2" 0 < > 0" :)2 eb dluohs( lavteR" >:#,_ $ . a,v v < >n #v=v > na".gnirts htgnel orez no detcelfer = :DAB">:#,_@ >v >02-w na".gnirts htgnel orez no 2- dehsup = :DOOG">:#,_@ >> na"gnirts htgnel orez no 2- hsup t'ndid = :DAB">:#,_@ This program should ouput (on a POSIX system): Hi there (and now a ls): <list of files in current directory, as ls outputs it> Retval (should be 0): 0 Will run: exit 2 Retval (should be 2): 2 GOOD: = pushed -2 on zero length string. There should be no indention in the output. (It was done here for clarity.) The blank lines should match. The last test (value on zero length string) is implementation defined, but cfunge is supposed to push -2. Other implementations may push other values (even 0).