svn commit: r269084 - in head: tools/build/mk usr.bin/units/tests
Julio Merino
jmmv at FreeBSD.org
Fri Jul 25 01:29:24 UTC 2014
Author: jmmv
Date: Fri Jul 25 01:29:22 2014
New Revision: 269084
URL: http://svnweb.freebsd.org/changeset/base/269084
Log:
Fix structure of new tests (r268794) for usr.bin/units.
- Make sure the tests go into the right directory. The location was
wrong so they were overwriting the bin/chown tests!
- Use the right naming scheme for the test program.
- Remove the svn:executable property from the shell script.
Added:
- copied unchanged from r269083, head/usr.bin/units/tests/units_basics.sh
Directory Properties:
head/usr.bin/units/tests/basics_test.sh (props changed)
Deleted:
head/usr.bin/units/tests/units_basics.sh
Modified:
head/tools/build/mk/OptionalObsoleteFiles.inc
head/usr.bin/units/tests/Makefile
Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jul 25 00:35:43 2014 (r269083)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jul 25 01:29:22 2014 (r269084)
@@ -4167,6 +4167,7 @@ OLD_FILES+=usr/share/aclocal/atf-c.m4
OLD_FILES+=usr/share/aclocal/atf-common.m4
OLD_FILES+=usr/share/aclocal/atf-sh.m4
OLD_DIRS+=usr/share/aclocal
+OLD_FILES+=usr/tests/bin/chown/units_basics
OLD_FILES+=usr/tests/usr.bin/atf/Kyuafile
OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/Kyuafile
OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/atf_check_test
Modified: head/usr.bin/units/tests/Makefile
==============================================================================
--- head/usr.bin/units/tests/Makefile Fri Jul 25 00:35:43 2014 (r269083)
+++ head/usr.bin/units/tests/Makefile Fri Jul 25 01:29:22 2014 (r269084)
@@ -2,8 +2,8 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/chown
+TESTSDIR= ${TESTSBASE}/usr.bin/units
-TAP_TESTS_SH= units_basics
+TAP_TESTS_SH= basics_test
.include <bsd.test.mk>
Copied: head/usr.bin/units/tests/basics_test.sh (from r269083, head/usr.bin/units/tests/units_basics.sh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/usr.bin/units/tests/basics_test.sh Fri Jul 25 01:29:22 2014 (r269084, copy of r269083, head/usr.bin/units/tests/units_basics.sh)
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $FreeBSD$
+
+base=`basename $0`
+
+echo "1..3"
+
+assert_equals() {
+ testnum="$1"
+ expected="$2"
+ fn="$3"
+ if [ "$expected" = "$($fn)" ]
+ then
+ echo "ok $testnum - $fn"
+ else
+ echo "not ok $testnum - $fn"
+ fi
+}
+
+assert_equals 1 1 "units -t ft ft"
+assert_equals 2 12 "units -t ft in"
+assert_equals 3 0.083333333 "units -t in ft"
More information about the svn-src-all
mailing list