]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
rework errors and warnings around insecure repositories
[apt.git] / test / integration / framework
index a9acd83a977899313105bc3e71e9b64c3c3e7342..b4220c8b56bb6bc22550a0ee4876596e643a2fc1 100644 (file)
@@ -1665,6 +1665,17 @@ testfailuremsg() {
        testoutputequal "$COMPAREFILE" echo "$CMP"
        msggroup
 }
+testwarningmsg() {
+       msggroup 'testwarningmsg'
+       local CMP="$1"
+       shift
+       testwarning "$@"
+       msgtest 'Check that the output of the previous warned command has expected' 'warnings'
+       local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testwarningmsg.comparefile"
+       grep '^\(W\|E\):' "${TMPWORKINGDIRECTORY}/rootdir/tmp/testwarning.output" > "$COMPAREFILE" 2>&1 || true
+       testoutputequal "$COMPAREFILE" echo "$CMP"
+       msggroup
+}
 
 testfilestats() {
        msggroup 'testfilestats'