From 4aca87515a5083ae0e31ce3177189fd43b6d05ac Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 3 Jan 2015 13:58:15 +0100 Subject: patch to Vanilla Tomato 1.28 --- .../busybox/shell/hush_test/hush-misc/exec.tests | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 release/src/router/busybox/shell/hush_test/hush-misc/exec.tests (limited to 'release/src/router/busybox/shell/hush_test/hush-misc/exec.tests') diff --git a/release/src/router/busybox/shell/hush_test/hush-misc/exec.tests b/release/src/router/busybox/shell/hush_test/hush-misc/exec.tests new file mode 100755 index 00000000..6de50fa7 --- /dev/null +++ b/release/src/router/busybox/shell/hush_test/hush-misc/exec.tests @@ -0,0 +1,30 @@ +# make sure we have a way of checking these things +cd /proc/$$/fd || cd /dev/fd || exit 1 + +[ -e 44 ] && exit 1 +exec 44>/dev/null +[ -e 44 ] || exit 1 +echo pass fd out open + +[ -e 55 ] && exit 1 +exec 55>&44 +[ -e 55 ] || exit 1 +echo pass fd out dup + +exec 44>&- +[ -e 44 ] && exit 1 +echo pass fd out close + +[ -e 66 ] && exit 1 +exec 66