mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2025-04-21 12:27:27 +03:00
qpkg: added regression test harness and a few tests
- Makefile (test, tests, valgrind): new targets to run regression tests - test/Common: test harness (adapted from fped) - test/minpkg: test minimum package definition - test/prereq: test basic prerequisite queries
This commit is contained in:
43
qpkg/test/minpkg
Executable file
43
qpkg/test/minpkg
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
. ./Common
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg_fail "no Version field" <<EOF
|
||||
Package: test
|
||||
EOF
|
||||
expect <<EOF
|
||||
package test has no version
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg_fail "no Architecture field" <<EOF
|
||||
Package: test
|
||||
Version: 1
|
||||
EOF
|
||||
expect <<EOF
|
||||
package test version 1 has no architecture
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg_fail "no Filename field" <<EOF
|
||||
Package: whatever
|
||||
Version: 1
|
||||
Architecture: test
|
||||
EOF
|
||||
expect <<EOF
|
||||
package whatever version 1 has no file name (nor is it installed)
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
|
||||
qpkg "minimum package definition" <<EOF
|
||||
Package: whatever
|
||||
Version: 1
|
||||
Architecture: test
|
||||
Filename: whatever_1_test.ipkg
|
||||
EOF
|
||||
expect <<EOF
|
||||
EOF
|
||||
Reference in New Issue
Block a user