freebsd-skq/usr.bin/units/tests/basics_test.sh
Julio Merino e40b4bf801 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.
2014-07-25 01:29:22 +00:00

23 lines
369 B
Bash

#!/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"