diff options
Diffstat (limited to 'tests/reduce_deps.sh')
-rwxr-xr-x | tests/reduce_deps.sh | 66 |
1 files changed, 27 insertions, 39 deletions
diff --git a/tests/reduce_deps.sh b/tests/reduce_deps.sh index 569a16c..0e5f7da 100755 --- a/tests/reduce_deps.sh +++ b/tests/reduce_deps.sh @@ -20,10 +20,6 @@ # along with the ProteanOS Development Kit. If not, see # <http://www.gnu.org/licenses/>. -. "${srcdir}/tests/common.sh" - -use deps - do_test() { local deps="${1}" @@ -45,38 +41,30 @@ do_test() fi } -# Normal and union AND-lists. - -do_test 'foo, bar' false 'amd64-linux-glibc' 'dev' 'foo, bar' - -do_test 'foo,bar' false 'amd64-linux-glibc' 'dev' 'foo, bar' - -do_test 'foo, bar' false 'amd64-linux-glibc' 'dev' 'foo, bar' - -do_test 'foo, bar' true 'amd64-linux-glibc' 'dev' 'foo, bar' - -do_test 'foo,bar' true 'amd64-linux-glibc' 'dev' 'foo, bar' - -do_test 'foo, bar' true 'amd64-linux-glibc' 'dev' 'foo, bar' - -# Normal and union OR-lists. - -do_test 'foo | bar' false 'amd64-linux-glibc' 'dev' 'foo | bar' - -do_test 'foo|bar' false 'amd64-linux-glibc' 'dev' 'foo | bar' - -do_test 'foo | bar' false 'amd64-linux-glibc' 'dev' 'foo | bar' - -# Normal and union AND-lists with arch specs. - -do_test 'foo [amd64-linux-glibc], bar [!amd64-linux-glibc]' false \ - 'amd64-linux-glibc' 'dev' 'foo' - -do_test 'foo [amd64-linux-glibc], bar [!amd64-linux-glibc]' true \ - 'amd64-linux-glibc' 'dev' 'foo' - -# Normal and union AND-lists with plat specs. - -do_test 'foo <dev>, bar <!dev>' false 'amd64-linux-glibc' 'dev' 'foo' - -do_test 'foo <dev>, bar <!dev>' true 'amd64-linux-glibc' 'dev' 'foo' +main() +{ + # Normal and union AND-lists. + do_test 'foo, bar' false 'amd64-linux-glibc' 'dev' 'foo, bar' + do_test 'foo,bar' false 'amd64-linux-glibc' 'dev' 'foo, bar' + do_test 'foo, bar' false 'amd64-linux-glibc' 'dev' 'foo, bar' + do_test 'foo, bar' true 'amd64-linux-glibc' 'dev' 'foo, bar' + do_test 'foo,bar' true 'amd64-linux-glibc' 'dev' 'foo, bar' + do_test 'foo, bar' true 'amd64-linux-glibc' 'dev' 'foo, bar' + + # Normal and union OR-lists. + do_test 'foo | bar' false 'amd64-linux-glibc' 'dev' 'foo | bar' + do_test 'foo|bar' false 'amd64-linux-glibc' 'dev' 'foo | bar' + do_test 'foo | bar' false 'amd64-linux-glibc' 'dev' 'foo | bar' + + # Normal and union AND-lists with arch specs. + do_test 'foo [amd64-linux-glibc], bar [!amd64-linux-glibc]' false \ + 'amd64-linux-glibc' 'dev' 'foo' + do_test 'foo [amd64-linux-glibc], bar [!amd64-linux-glibc]' true \ + 'amd64-linux-glibc' 'dev' 'foo' + + # Normal and union AND-lists with plat specs. + do_test 'foo <dev>, bar <!dev>' false 'amd64-linux-glibc' 'dev' 'foo' + do_test 'foo <dev>, bar <!dev>' true 'amd64-linux-glibc' 'dev' 'foo' + + return 0 +} |