annotate tests/test-helpfulflags/test-helpfulflags.sh @ 367:93dba46baf35

Subrepo update
author Chris Cannam
date Tue, 12 May 2020 09:50:40 +0100
parents 0774f36cb151
children
rev   line source
Chris@0 1 #!/bin/bash
Chris@0 2
Chris@119 3 . ../include.sh
Chris@0 4
Chris@0 5 $r >/dev/null 2>&1 && \
Chris@0 6 fail "Return code 0 when run without args (should be a failure code)"
Chris@0 7
Chris@0 8 $r 2>&1 >/dev/null | grep -q "for help" || \
Chris@0 9 fail "Improper response when run without args"
Chris@0 10
Chris@0 11 $r --help 2>&1 | grep -q Copy || \
Chris@0 12 fail "Expected help not printed when run with --help"
Chris@0 13
Chris@0 14 $r --list >/dev/null 2>&1 || \
Chris@0 15 fail "Fails to run with --list"
Chris@0 16
Chris@118 17 $r --list 2>/dev/null | grep -q $percplug || \
Chris@118 18 fail "Fails to print $percplug in plugin list (if you haven't got it, install it -- it's needed for other tests)"
Chris@118 19
Chris@0 20 $r --list 2>/dev/null | grep -q $testplug || \
Chris@0 21 fail "Fails to print $testplug in plugin list (if you haven't got it, install it -- it's needed for other tests)"
Chris@0 22
Chris@118 23 $r --skeleton $percplug >/dev/null || \
Chris@118 24 fail "Fails to run with --skeleton $percplug"
Chris@75 25
Chris@118 26 $r -s $percplug >/dev/null || \
Chris@118 27 fail "Fails to run with -s $percplug"
Chris@0 28
Chris@118 29 $r --skeleton $percplug >/dev/null || \
Chris@118 30 fail "Fails to run with --skeleton $percplug"
Chris@0 31
Chris@118 32 $r --skeleton $percplug | rapper -i turtle - test >/dev/null 2>&1 || \
Chris@118 33 fail "Invalid XML skeleton produced with --skeleton $percplug"
Chris@0 34
Chris@127 35 $r --minversion $version || \
Chris@127 36 fail "Returned failure code when run with --minversion $version"
Chris@127 37
Chris@138 38 $r --minversion $nextversion 2>/dev/null && \
Chris@138 39 fail "Returned success code when run with --minversion $nextversion"
Chris@127 40
Chris@127 41 $r --minversion 63.9 2>/dev/null && \
Chris@127 42 fail "Returned success code when run with --minversion 63.9"
Chris@127 43
Chris@255 44 $r --transform-minversion $percplug 1 || \
Chris@255 45 fail "Returned failure code when run with --transform-minversion $percplug 1"
Chris@255 46
Chris@255 47 $r --transform-minversion $percplug 50 2>/dev/null && \
Chris@255 48 fail "Returned success code when run with --transform-minversion $percplug 50"
Chris@255 49
Chris@0 50 exit 0