Commit 5707d7ef authored by Vitaly Lipatov's avatar Vitaly Lipatov

update tests

parent 2ae701b1
#!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common
#load_mod spec
check()
{
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$2' do not match with '$3'" || echo "OK for '$1' with '$2'"
}
# TODO: move to lib
isnumber()
{
#local num="$(("$*"))"
echo "$*" | filter_strip_spaces | grep -q "^[0-9]\+$"
#[ "$num" != "0" ]
}
check_arg()
{
check "$1" "$(isnumber "$1" ; echo $?)" "$2"
}
check_arg "" "1"
check_arg " " "1"
check_arg "5" "0"
check_arg " 6" "0"
check_arg "7 " "0"
check_arg "12" "0"
check_arg "12 5" "1"
check_arg "12 q" "1"
check_arg "q" "1"
check_arg "q w" "1"
check_arg "52q" "1"
check_arg "q52" "1"
......@@ -43,7 +43,8 @@ BUILDNAME=wine
DISTRNAME=Ubuntu
PKGVENDOR=ubuntu
PKGFORMAT=deb
DISTRVERSION=11.04
DISTRVERSION=16.04
BUILDARCH=x86_64
echo "Replacement files for $PKGVENDOR/$DISTRVERSION (target $PKGFORMAT):"
......@@ -52,6 +53,7 @@ print_pkgrepl_list
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusb-1.0-0-dev
check_repl libstdc++ libstdc++
check_repl perl-podlators perl
DISTRNAME=Mandriva
......@@ -206,4 +208,4 @@ echo
echo "Replacement files for $PKGVENDOR/$DISTRVERSION (target $PKGFORMAT):"
print_pkgrepl_list
check_repl libicu-devel "lib64icu-devel"
\ No newline at end of file
check_repl libicu-devel "lib64icu-devel"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment