1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-18 23:20:16 +02:00
wernermisc/qpkg/test/verpref
Werner Almesberger b181db5b9e qpkg: regression test for version preference
- test/verpref: test version preference (higher wins if there's a choice)
- TODO: updated for above change
2010-11-21 23:02:10 -03:00

97 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
. ./Common
###############################################################################
qpkg "prefer later version (1)" prereq foo <<EOF
Package: bar
Version: 0
Architecture: test
Filename: bar_0
Package: bar
Version: 1
Architecture: test
Filename: bar_1
Package: foo
Version: 0
Architecture: test
Depends: bar
Filename: foo
EOF
expect <<EOF
bar_1
EOF
###############################################################################
qpkg "prefer later version (2)" prereq foo <<EOF
Package: bar
Version: 1
Architecture: test
Filename: bar_1
Package: bar
Version: 0
Architecture: test
Filename: bar_0
Package: foo
Version: 0
Architecture: test
Depends: bar
Filename: foo
EOF
expect <<EOF
bar_1
EOF
###############################################################################
qpkg "dependency trumps preference (1)" prereq foo <<EOF
Package: bar
Version: 0
Architecture: test
Filename: bar_0
Package: bar
Version: 1
Architecture: test
Depends: bad
Filename: bar_1
Package: foo
Version: 0
Architecture: test
Depends: bar
Filename: foo
EOF
expect <<EOF
bar_0
EOF
###############################################################################
qpkg "dependency trumps preference (2)" prereq foo <<EOF
Package: bar
Version: 1
Architecture: test
Depends: bad
Filename: bar_1
Package: bar
Version: 0
Architecture: test
Filename: bar_0
Package: foo
Version: 0
Architecture: test
Depends: bar
Filename: foo
EOF
expect <<EOF
bar_0
EOF