From 0703144d9083cc23a38fe6e49e532f0bdddef22b Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Thu, 18 Oct 2018 17:10:03 +0200 Subject: + test handling of dofiles that write to $3 or stdout --- stdout-and-$3/all.do | 14 ++++++++++++++ stdout-and-$3/param3.do | 2 ++ stdout-and-$3/stdout.do | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 stdout-and-$3/param3.do create mode 100644 stdout-and-$3/stdout.do (limited to 'stdout-and-$3') diff --git a/stdout-and-$3/all.do b/stdout-and-$3/all.do index a6d65eb..767863e 100644 --- a/stdout-and-$3/all.do +++ b/stdout-and-$3/all.do @@ -1,4 +1,18 @@ #!/bin/sh +[ -e stdout ] && rm stdout +redo-ifchange stdout +read -r STDOUT &2 'PASS: Write to stdout possible.\n' \ + || printf >&2 'FAIL: Write to stdout impossible.\n' + +[ -e param3 ] && rm param3 +redo-ifchange param3 +read -r PARAM3 &2 'PASS: Write to $3 possible.\n' \ + || printf >&2 'FAIL: Write to $3 impossible.\n' + redo-ifchange bogus \ && printf >&2 'FAIL: Write to $3 and stdout possible.\n' \ || printf >&2 'PASS: Write to $3 and stdout impossible.\n' diff --git a/stdout-and-$3/param3.do b/stdout-and-$3/param3.do new file mode 100644 index 0000000..3333254 --- /dev/null +++ b/stdout-and-$3/param3.do @@ -0,0 +1,2 @@ +#!/bin/sh +printf 'param3\n' >${3} diff --git a/stdout-and-$3/stdout.do b/stdout-and-$3/stdout.do new file mode 100644 index 0000000..0c9c3c8 --- /dev/null +++ b/stdout-and-$3/stdout.do @@ -0,0 +1,2 @@ +#!/bin/sh +printf 'stdout\n' -- cgit v1.2.3