summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-redir
diff options
context:
space:
mode:
authorDenys Vlasenko2019-11-01 14:16:07 +0100
committerDenys Vlasenko2019-11-01 14:16:07 +0100
commit21806562ca6350c78a14a89c22f985900ce96ade (patch)
tree8f6aa1ce178688c9668102c888b851e25490118e /shell/hush_test/hush-redir
parentea096d6c1389c93bdb6c6c45a04aff9062c7d8cf (diff)
downloadbusybox-21806562ca6350c78a14a89c22f985900ce96ade.zip
busybox-21806562ca6350c78a14a89c22f985900ce96ade.tar.gz
hush: restore redirected stdin
function old new delta restore_redirects 52 95 +43 save_fd_on_redirect 243 253 +10 hfopen 90 99 +9 fgetc_interactive 259 261 +2 builtin_type 117 115 -2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 64/-2) Total: 62 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-redir')
-rw-r--r--shell/hush_test/hush-redir/redir_stdin1.right3
-rwxr-xr-xshell/hush_test/hush-redir/redir_stdin1.tests7
2 files changed, 10 insertions, 0 deletions
diff --git a/shell/hush_test/hush-redir/redir_stdin1.right b/shell/hush_test/hush-redir/redir_stdin1.right
new file mode 100644
index 0000000..1c6217e
--- /dev/null
+++ b/shell/hush_test/hush-redir/redir_stdin1.right
@@ -0,0 +1,3 @@
+#Testing that stdin redirect is restored
+read2
+Ok:0
diff --git a/shell/hush_test/hush-redir/redir_stdin1.tests b/shell/hush_test/hush-redir/redir_stdin1.tests
new file mode 100755
index 0000000..f72253f
--- /dev/null
+++ b/shell/hush_test/hush-redir/redir_stdin1.tests
@@ -0,0 +1,7 @@
+#Testing that stdin redirect is restored
+echo read2 | $THIS_SH -c 'read r <redir_stdin1.tests
+echo $r
+read r
+echo $r
+'
+echo Ok:$?