/usr/share/doc/littler/tests/exitstatus.sh is in littler 0.2.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/bash
echo "Testing value of 'q(status=...)' exits for r:"
echo "q(status=123)" | ../r
echo " Got: $? via stdin"
echo "q(status=124)" | ../r -
echo " Got: $? via file '-'"
../r -e "q(status=125)"
echo " Got: $? from 'r -e'"
tempfile=`tempfile`
echo "q(status=126)" > $tempfile
../r $tempfile
echo -n " Got: $? from temp. file and "
rm -v $tempfile
echo "Testing value of 'q(status=...)' exits for Rscript:"
echo "q(status=123)" | Rscript -
echo " Got: $? via stdin"
Rscript -e "q(status=124)"
echo " Got: $? from 'r -e'"
tempfile=`tempfile`
echo "q(status=125)" > $tempfile
Rscript $tempfile
echo -n " Got: $? from temp. file and "
rm -v $tempfile
|