Module Name: othersrc Committed By: agc Date: Tue May 31 01:59:47 UTC 2016
Added Files: othersrc/external/bsd/delta/bin: Testspec Log Message: Convert the tests in the Makefile to atf, by means of human2atf, and add the resulting Testspec file. Results of running atf checks: [18:57:43] agc@netbsd-002 ...tests/usr.bin/delta [3390] > sudo make test *** WARNING: make test is experimental *** *** Using this test does not preclude you from running the tests *** installed in /usr/tests. This test run may raise false *** positives and/or false negatives. Tests root: /usr/tests/usr.bin/delta t_delta (1/1): 3 test cases delta_testset_1_basics: [0.027398s] Passed. delta_testset_2_backwards: [0.029421s] Passed. delta_testset_3_more_extensive_changes: [0.027521s] Passed. [0.089274s] Summary for 1 test programs: 3 passed test cases. 0 failed test cases. 0 expected failed test cases. 0 skipped test cases. *** The verbatim output of atf-run has been saved to /usr/tests/usr.bin/delta/atf-run.log *** Once again, note that make test is unsupported. [18:57:46] agc@netbsd-002 ...tests/usr.bin/delta [3391] > To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/delta/bin/Testspec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: othersrc/external/bsd/delta/bin/Testspec diff -u /dev/null othersrc/external/bsd/delta/bin/Testspec:1.1 --- /dev/null Tue May 31 01:59:47 2016 +++ othersrc/external/bsd/delta/bin/Testspec Tue May 31 01:59:47 2016 @@ -0,0 +1,60 @@ +#! /bin/sh + +# $NetBSD: Testspec,v 1.1 2016/05/31 01:59:47 agc Exp $ + +# Copyright (c) 2016 Alistair Crooks <a...@netbsd.org> +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +TESTNAME=delta + +# basic tests +TESTSET_1_NAME=basics +TESTSET_1_FILES=' +1 +2 +' +TESTSET_1_CASE_1="-s eq:0 -o empty -e empty delta -d 1 2 2.diff" +TESTSET_1_CASE_2="-s eq:0 -o empty -e empty delta -p 1 2.new 2.diff" +TESTSET_1_CASE_3="-s eq:0 -o file:2 -e empty cat 2.new" + +# same test backwards +TESTSET_2_NAME=backwards +TESTSET_2_FILES=' +1 +2 +' +TESTSET_2_CASE_1="-s eq:0 -o empty -e empty delta -d 2 1 2.diff" +TESTSET_2_CASE_2="-s eq:0 -o empty -e empty delta -p 2 1.new 2.diff" +TESTSET_2_CASE_3="-s eq:0 -o file:1 -e empty cat 1.new" + +# more extensive changes +TESTSET_3_NAME=more_extensive_changes +TESTSET_3_FILES=' +3 +4 +' +TESTSET_3_CASE_1="-s eq:0 -o empty -e empty delta -d 4 3 4.diff" +TESTSET_3_CASE_2="-s eq:0 -o empty -e empty delta -p 4 3.new 4.diff" +TESTSET_3_CASE_3="-s eq:0 -o file:3 -e empty cat 3.new" +