From 98b6cd9b8d3cc6be1fc957e5a31266852d53497a Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 7 Dec 2012 23:43:09 +0000 Subject: [PATCH] add testcase for basic I/O redir which RT had issues with on Linux 0.11 --- check.t | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/check.t b/check.t index 6c101aa..b97fa97 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.571 2012/12/05 19:38:18 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.572 2012/12/07 23:43:09 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -8134,6 +8134,36 @@ stdin: expected-stdout: okay --- +name: redir-1 +description: + Check some of the most basic invariants of I/O redirection +stdin: + i=0 + function d { + print o$i. + print -u2 e$((i++)). + } + d >a 2>b + echo =1= + cat a + echo =2= + cat b + echo =3= + d 2>&1 >c + echo =4= + cat c + echo =5= +expected-stdout: + =1= + o0. + =2= + e0. + =3= + e1. + =4= + o1. + =5= +--- name: bashiop-1 description: Check if GNU bash-like I/O redirection works