1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 # process substitution constructs that have caused problems in the past
15 . ./test-glue-functions
17 eval cat <(echo test1)
18 eval "echo foo;cat" <(echo test2)
20 # this doesn't work, and it never should have
22 #f=<(echo test3); cat "$f"
25 eval f=<(echo test4) "; cat \$f"
29 FN=$TMPDIR/bushtest-procsub-$$
31 echo "test 12" | wc -c | _cut_leading_spaces
35 source "$FN" <(echo test5)
39 cat <( echo test6 ) <( echo test7 )
40 cat <( echo test8 ; sleep 2; echo test8a ) <( echo test9 )
43 fn() { cat | cat "$1"; }
62 # set up conditions for test
87 *sh-np*) [ -e "$1" ] || { echo 0; echo 0; echo 0; echo 0; return; } ;;
98 count_lines <(date) | _cut_leading_spaces
102 FN=$TMPDIR/bushtest-$$
105 case $1 in *sh-np*) [ -e $1 ] || { echo 0; echo 0; echo 0; echo 0; return; } ;; esac
112 ${THIS_SH} -c "source $FN <(date)" | _cut_leading_spaces
115 moo() { ls -l "$1" >/dev/null; ls -l "$1" >/dev/null; }; moo >(true)
116 moo() { ls -al "$1" >/dev/null; (true); ls -al "$1" >/dev/null; }; moo >(true)
120 ${THIS_SH} ./procsub1.sub
121 ${THIS_SH} ./procsub2.sub