]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/cprint.right
Imported from ../bash-2.05.tar.gz.
[thirdparty/bash.git] / tests / cprint.right
CommitLineData
b72432fd
JA
1tf is a function
2tf ()
3{
4 echo this is ${0##*/} >/dev/null;
5 echo a | cat - >/dev/null;
6 test -f ${0##*/} && echo ${0##*/} is a regular file;
7 test -d ${0##*/} || echo ${0##*/} is not a directory;
8 echo a;
9 echo b;
10 echo c;
11 echo background >/dev/null & ( exit 1 );
12 echo $?;
13 {
14 echo a
15 };
16 i=0;
17 while (( " i < 3 " )); do
18 test -r /dev/fd/$i;
19 i=$(( i + 1 ));
20 done;
21 [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops >/dev/null;
22 for name in $( echo 1 2 3 );
23 do
24 test -r /dev/fd/$name;
25 done;
26 if [[ -r /dev/fd/0 && -w /dev/fd/1 ]]; then
27 echo ok >/dev/null;
28 else
29 if (( " 7 > 40 " )); then
30 echo oops;
31 else
32 echo done;
33 fi;
34 fi >/dev/null;
35 case $PATH in
36 *$PWD*)
37 echo \$PWD in \$PATH
38 ;;
39 *)
40 echo \$PWD not in \$PATH
41 ;;
42 esac >/dev/null;
43 while false; do
44 echo z;
45 done >/dev/null;
46 until true; do
47 echo z;
48 done >/dev/null;
49 echo \&\|'()' \{ echo abcde \; \};
50 eval fu\%nc'()' \{ echo abcde \; \};
51 type fu\%nc
52}
53tf2 is a function
54tf2 ()
55{
56 ( {
57 time -p echo a | cat - >/dev/null
28ef6c31
JA
58 } ) 2>&1
59}
b72432fd
JA
60cprint.tests is a regular file
61cprint.tests is not a directory
62a
63b
64c
651
66a
67&|() { echo abcde ; }
68fu%nc is a function
69fu%nc ()
70{
71 echo abcde
72}