test_smallfuncs.sh 455 Bytes
Newer Older
1 2
#!/bin/sh

3
#. ../bin/epm-sh-functions
4 5
has_space()
{
6
    ../bin/tools_estrlist has_space "$@"
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
}

notok()
{
    echo "notok test for '$*'"
    has_space "$@" && echo "FAILED: space(s) detected"
}

ok()
{
    echo "ok test for '$*'"
    has_space "$@" || echo "FAILED: space(s) not detected"
}

notok "list"
ok "l i s t"
23
ok "li st"
24 25 26 27 28
ok " l i s t "
ok " l "
ok "  "
ok " "
notok ""
29 30

notok "http://updates.etersoft.ru/pub/Korinf/x86_64/Ubuntu/20.04/eepm_*.deb"