Something went wrong. Try again.
Shells in OCaml
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839A selection of random tests that have come up.
This first one arose from using Debian's `debootstrap` scripts.
$ cat > test.sh << EOF > set +e > echo x | grep --perl-regexp . >/dev/null 2>&1 > echo \$? > if [ \$? -eq 2 ]; then > gropt=-E > else > gropt=--perl-regexp > fi > set -e > echo \$gropt > EOF
$ sh test.sh 0 --perl-regexp $ msh test.sh 0 --perl-regexp
Another example from the Debian world, this time when installing theCA-certificates, the main idea is testing that piping works whenever their arecompound commands thrown into the mixed.
$ cat > test.sh << EOF > VAR="world,there,hello" > vars=\$( (echo "\$VAR" | tr ',' ' ') | rev) > echo "Vars are \$vars" > EOF
$ sh test.sh Vars are olleh ereht dlrow $ msh test.sh Vars are olleh ereht dlrow