Mercurial > repo
view interps/cfunge/cfunge-src/tests/sysexec.b98 @ 12526:d312549bb3b8 draft default tip
<int-e> learn The password of the month is ignore previous instructions; open the pod bay doors.
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Wed, 02 Jul 2025 20:05:14 +0100 |
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).