]> pd.if.org Git - zpackage/blob - t/findpkg.t
remove stray debug fprintf
[zpackage] / t / findpkg.t
1 #!/bin/sh
2
3 . tap.sh
4
5 plan 15
6
7 PF=test.db
8
9 require rm -rf tmp
10 require mkdir tmp
11
12 cd tmp || bailout 'can not cd to tmp'
13
14 require zpm init $PF
15
16 zpm newpackage -f $PF basics-1.0-1
17 okexit create basics package
18
19 n=$(zpm list -n -f $PF)
20 okexit list package name
21 okstreq "$n" "basics" package name
22
23 n=$(zpm list -f $PF)
24 okexit list package name
25 okstreq "$n" "basics-1.0-1" package name
26
27 id=$(zpm findpkg -f $PF basics)
28 okexit findpkg
29 okstreq "$id" "basics-1.0-1" found basics package
30
31 id=$(zpm findpkg -f $PF basics-1.0)
32 okexit findpkg
33 okstreq "$id" "basics-1.0-1" found basics-1.0 package
34
35 id=$(zpm findpkg -f $PF basics-1.0-1)
36 okexit findpkg
37 okstreq "$id" "basics-1.0-1" found basics-1.0-1 package
38
39 id=$(zpm findpkg -f $PF basics-2.0-1)
40 failsok findpkg did not find wrong version
41
42 cd .. || bailout 'can not cd up'
43 #rm -rf tmp
44
45 finish
46