multi_test.sh (192733) | multi_test.sh (197352) |
---|---|
1#!/bin/sh - 2# 3# Copyright (c) 1992 Diomidis Spinellis. 4# Copyright (c) 1992, 1993 5# The Regents of the University of California. 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 --- 16 unchanged lines hidden (view full) --- 25# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29# SUCH DAMAGE. 30# 31# @(#)sed.test 8.1 (Berkeley) 6/6/93 32# | 1#!/bin/sh - 2# 3# Copyright (c) 1992 Diomidis Spinellis. 4# Copyright (c) 1992, 1993 5# The Regents of the University of California. 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 --- 16 unchanged lines hidden (view full) --- 25# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29# SUCH DAMAGE. 30# 31# @(#)sed.test 8.1 (Berkeley) 6/6/93 32# |
33# $FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 192733 2009-05-25 06:58:42Z brian $ | 33# $FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 197352 2009-09-20 13:39:44Z dds $ |
34# 35 36# sed Regression Tests 37# 38# The directory regress.test.out contains the expected test results 39# | 34# 35 36# sed Regression Tests 37# 38# The directory regress.test.out contains the expected test results 39# |
40# These are the regression tests created during the development of the 41# BSD sed. The reference file naming scheme used in this script can't 42# handle gracefully the insertion of new tests between existing ones. 43# Therefore, either use the new m4-based regress.t framework, or add 44# tests after the last existing test. | 40# These are the regression tests mostly created during the development 41# of the BSD sed. Each test should have a unique mark name, which is 42# used for naming the corresponding file in regress.multitest.out. |
45 46main() 47{ 48 cd `dirname $0` 49 REGRESS=regress.multitest.out 50 DICT=/usr/share/dict/words 51 52 awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' </dev/null >lines1 --- 30 unchanged lines hidden (view full) --- 83# Display a test's result 84result() 85{ 86 if [ "$TODO" = '1' ] ; then 87 TODO='TODO ' 88 else 89 TODO='' 90 fi | 43 44main() 45{ 46 cd `dirname $0` 47 REGRESS=regress.multitest.out 48 DICT=/usr/share/dict/words 49 50 awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' </dev/null >lines1 --- 30 unchanged lines hidden (view full) --- 81# Display a test's result 82result() 83{ 84 if [ "$TODO" = '1' ] ; then 85 TODO='TODO ' 86 else 87 TODO='' 88 fi |
91 if ! [ -r $REGRESS/${MARK}_${TESTNAME} ] ; then 92 echo "Seeding $REGRESS/${MARK}_${TESTNAME} with current result" 1>&2 93 cp current.out $REGRESS/${MARK}_${TESTNAME} | 89 if ! [ -r $REGRESS/${TESTNAME} ] ; then 90 echo "Seeding $REGRESS/${TESTNAME} with current result" 1>&2 91 cp current.out $REGRESS/${TESTNAME} |
94 fi | 92 fi |
95 if diff -c $REGRESS/${MARK}_${TESTNAME} current.out ; then | 93 if diff -c $REGRESS/${TESTNAME} current.out ; then |
96 echo "ok $MARK $TESTNAME # $TODO$COMMENT" 97 else 98 echo "not ok $MARK $TESTNAME # $TODO$COMMENT" 99 fi 1>&4 2>&5 100} 101 102# Mark the beginning of each test 103mark() --- 372 unchanged lines hidden --- | 94 echo "ok $MARK $TESTNAME # $TODO$COMMENT" 95 else 96 echo "not ok $MARK $TESTNAME # $TODO$COMMENT" 97 fi 1>&4 2>&5 98} 99 100# Mark the beginning of each test 101mark() --- 372 unchanged lines hidden --- |