legacy_test.sh (219084) | legacy_test.sh (228109) |
---|---|
1#!/bin/sh 2 3#- 4# Copyright (c) June 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26# SUCH DAMAGE. 27 28# 29# TEST.sh - check if test(1) or builtin test works 30# | 1#!/bin/sh 2 3#- 4# Copyright (c) June 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26# SUCH DAMAGE. 27 28# 29# TEST.sh - check if test(1) or builtin test works 30# |
31# $FreeBSD: head/tools/regression/bin/test/regress.sh 219084 2011-02-27 12:28:06Z delphij $ | 31# $FreeBSD: head/tools/regression/bin/test/regress.sh 228109 2011-11-28 23:10:53Z jilles $ |
32 33# force a specified test program, e.g. `env test=/bin/test sh regress.sh' 34: ${test=test} 35 36t () 37{ 38 # $1 -> exit code 39 # $2 -> $test expression --- 7 unchanged lines hidden (view full) --- 47 elif [ "$ret" != "$1" ]; then 48 printf "not ok %s - (got $ret, expected $1)\n" "$count $2" 49 else 50 printf "ok %s\n" "$count $2" 51 fi 52} 53 54count=0 | 32 33# force a specified test program, e.g. `env test=/bin/test sh regress.sh' 34: ${test=test} 35 36t () 37{ 38 # $1 -> exit code 39 # $2 -> $test expression --- 7 unchanged lines hidden (view full) --- 47 elif [ "$ret" != "$1" ]; then 48 printf "not ok %s - (got $ret, expected $1)\n" "$count $2" 49 else 50 printf "ok %s\n" "$count $2" 51 fi 52} 53 54count=0 |
55echo "1..97" | 55echo "1..130" |
56 57t 0 'b = b' 58t 0 'b == b' 59t 1 'b != b' 60t 0 '\( b = b \)' 61t 0 '\( b == b \)' 62t 1 '! \( b = b \)' 63t 1 '! \( b == b \)' --- 69 unchanged lines hidden (view full) --- 133t 0 '! = !' 134t 1 '! != !' 135t 1 '-n = \)' 136t 0 '! != \)' 137t 1 '! = a' 138t 0 '! != -n' 139t 0 '! -c /etc/passwd' 140 | 56 57t 0 'b = b' 58t 0 'b == b' 59t 1 'b != b' 60t 0 '\( b = b \)' 61t 0 '\( b == b \)' 62t 1 '! \( b = b \)' 63t 1 '! \( b == b \)' --- 69 unchanged lines hidden (view full) --- 133t 0 '! = !' 134t 1 '! != !' 135t 1 '-n = \)' 136t 0 '! != \)' 137t 1 '! = a' 138t 0 '! != -n' 139t 0 '! -c /etc/passwd' 140 |
141t 0 '! \( = \)' 142t 1 '! \( != \)' | |
143t 1 '! = = =' 144t 0 '! = = \)' 145t 0 '! "" -o ""' 146t 1 '! "x" -o ""' 147t 1 '! "" -o "x"' 148t 1 '! "x" -o "x"' 149t 0 '\( -f /etc/passwd \)' | 141t 1 '! = = =' 142t 0 '! = = \)' 143t 0 '! "" -o ""' 144t 1 '! "x" -o ""' 145t 1 '! "" -o "x"' 146t 1 '! "x" -o "x"' 147t 0 '\( -f /etc/passwd \)' |
150t 1 '\( ! = \)' | |
151t 0 '\( ! "" \)' 152t 1 '\( ! -e \)' 153 154t 0 '0 -eq 0 -a -d /' 155t 0 '-s = "" -o "" = ""' 156t 0 '"" = "" -o -s = ""' 157t 1 '-s = "" -o -s = ""' 158t 0 '-z x -o x = "#" -o x = x' 159t 1 '-z y -o y = "#" -o y = x' 160t 0 '0 -ne 0 -o ! -f /' 161t 0 '1 -ne 0 -o ! -f /etc/passwd' 162t 1 '0 -ne 0 -o ! -f /etc/passwd' | 148t 0 '\( ! "" \)' 149t 1 '\( ! -e \)' 150 151t 0 '0 -eq 0 -a -d /' 152t 0 '-s = "" -o "" = ""' 153t 0 '"" = "" -o -s = ""' 154t 1 '-s = "" -o -s = ""' 155t 0 '-z x -o x = "#" -o x = x' 156t 1 '-z y -o y = "#" -o y = x' 157t 0 '0 -ne 0 -o ! -f /' 158t 0 '1 -ne 0 -o ! -f /etc/passwd' 159t 1 '0 -ne 0 -o ! -f /etc/passwd' |
160 161t 0 '-n =' 162t 1 '-z =' 163t 1 '! =' 164t 0 '-n -eq' 165t 1 '-z -eq' 166t 1 '! -eq' 167t 0 '-n -a' 168t 1 '-z -a' 169t 1 '! -a' 170t 0 '-n -o' 171t 1 '-z -o' 172t 1 '! -o' 173t 1 '! -n =' 174t 0 '! -z =' 175t 0 '! ! =' 176t 1 '! -n -eq' 177t 0 '! -z -eq' 178t 0 '! ! -eq' 179t 1 '! -n -a' 180t 0 '! -z -a' 181t 0 '! ! -a' 182t 1 '! -n -o' 183t 0 '! -z -o' 184t 0 '! ! -o' 185t 0 '\( -n = \)' 186t 1 '\( -z = \)' 187t 1 '\( ! = \)' 188t 0 '\( -n -eq \)' 189t 1 '\( -z -eq \)' 190t 1 '\( ! -eq \)' 191t 0 '\( -n -a \)' 192t 1 '\( -z -a \)' 193t 1 '\( ! -a \)' 194t 0 '\( -n -o \)' 195t 1 '\( -z -o \)' 196t 1 '\( ! -o \)' |
|