Deleted Added
full compact
legacy_test.sh (215022) legacy_test.sh (219084)
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 215022 2010-11-08 23:15:10Z jilles $
31# $FreeBSD: head/tools/regression/bin/test/regress.sh 219084 2011-02-27 12:28:06Z delphij $
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..94"
55echo "1..97"
56
57t 0 'b = b'
56
57t 0 'b = b'
58t 0 'b == b'
58t 1 'b != b'
59t 0 '\( b = b \)'
59t 1 'b != b'
60t 0 '\( b = b \)'
61t 0 '\( b == b \)'
60t 1 '! \( b = b \)'
62t 1 '! \( b = b \)'
63t 1 '! \( b == b \)'
61t 1 '! -f /etc/passwd'
62
63t 0 '-h = -h'
64t 0 '-o = -o'
65t 1 '-f = h'
66t 1 '-h = f'
67t 1 '-o = f'
68t 1 'f = -o'

--- 91 unchanged lines hidden ---
64t 1 '! -f /etc/passwd'
65
66t 0 '-h = -h'
67t 0 '-o = -o'
68t 1 '-f = h'
69t 1 '-h = f'
70t 1 '-o = f'
71t 1 'f = -o'

--- 91 unchanged lines hidden ---