7 # 18 vtests, 3 least, 3 greatest, 2 other, 3 temp handling
15 res=$(zpm-vercmp "$1" "$2")
16 okstreq "$res" -1 "$1 < $2"
18 res=$(zpm-vercmp "$2" "$1")
19 okstreq "$res" 1 "$2 > $1"
21 res=$(zpm-vercmp "$1" "$1")
22 okstreq "$res" 0 "$1 == $1"
24 res=$(zpm shell vercmp.db "select '$1' < '$2' collate vercmp")
25 okstreq "$res" 1 "zpm shell $1 < $2"
26 res=$(zpm shell vercmp.db "select '$1' > '$2' collate vercmp")
27 okstreq "$res" 0 "zpm shell not $1 > $2"
28 res=$(zpm shell vercmp.db "select '$1' = '$1' collate vercmp")
29 okstreq "$res" 1 "zpm shell $1 = $1"
35 l=$(zpm vercmp -L "$@")
36 okstreq "$l" "$want" "least $*"
42 g=$(zpm vercmp -G "$@")
43 okstreq "$g" "$want" "greatest $*"
53 #zpm vercmp -gq 'gnupg-1.0-1' "gnupg-2.0-1"
54 #exitwith 1 vercmp -g not gt
56 #zpm vercmp -gq 'gnupg-2.0-1' "gnupg-1.0-1"
57 #exitwith 0 vercmp -g is gt
82 vtest ffmpeg-4.1-3 ffmpeg-4.1.1-1
84 vtest 'pcre-8.42-2' 'pcre-8.43-1'