add testcase for basic I/O redir which RT had issues with on Linux 0.11

This commit is contained in:
tg 2012-12-07 23:43:09 +00:00
parent f654a3dea4
commit 98b6cd9b8d
1 changed files with 31 additions and 1 deletions

32
check.t
View File

@ -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