type2.0 revision 302408
1# $FreeBSD: stable/11/bin/sh/tests/builtins/type2.0 201344 2009-12-31 17:44:24Z jilles $ 2 3failures=0 4 5check() { 6 if ! eval "$*"; then 7 echo "Failed: $*" 8 : $((failures += 1)) 9 fi 10} 11 12check 'PATH=/libexec type ld-elf.so.1 >/dev/null' 13check '! PATH=/libexec type ls 2>/dev/null' 14 15PATH=/libexec:$PATH 16 17check 'type ld-elf.so.1 >/dev/null' 18 19PATH=/libexec 20 21check 'type ld-elf.so.1 >/dev/null' 22check '! type ls 2>/dev/null' 23check 'PATH=/bin type ls >/dev/null' 24check '! PATH=/bin type ld-elf.so.1 2>/dev/null' 25 26exit $((failures > 0)) 27