1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-28 21:16:14 +02:00
wernermisc/qpkg/test/minpkg
Werner Almesberger 2c953a5d1a 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
2010-11-21 04:32:04 -03:00

44 lines
887 B
Bash
Executable File

#!/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