#!/bin/sh

source $testsuitedir/lib_test.sh

cat > PROGRAMME << EOP
	:write :stdout ~s "before\n"
	:goto child :when :clone
	:write :stdout ~s "father\n"
	:child
	:write :stdout ~s "after\n"
	:shutdown
:label child
	:wait 1
	:write :stdout ~s "child\n"
	:shutdown -1

EOP

cat > MEMOIRE_INITIALE << EOM
# Memory:
# Aliases:
# Free addresses:
# Free blocks:
# End of memory
EOM

cat > MEMOIRE_REF << EOM
# Memory:
# Aliases:
# Free addresses:
# Free blocks:
# End of memory
EOM

cat > STDOUT_REF << EOS
before
father
child
after
EOS

cat > STDERR_REF << EOS
EOS

cat > CODE_RETOUR_REF << EOC
0
EOC

test_basique
