diff --git a/CLI/Issues/1289/1289.bats b/CLI/Issues/1289/1289.bats index 4af8a1e..3f14b79 100644 --- a/CLI/Issues/1289/1289.bats +++ b/CLI/Issues/1289/1289.bats @@ -11,5 +11,36 @@ setup() { [ "$status" -eq 1 ] - assert_output --partial '"featuresReport":{"informationDict":{"entry":{"key":"Title","value":"REPORT BY THE INDEPENDENT SCRUTINY PANEL"},"entry":{"key":"Author","value":"Sandra McDougall"},"entry":{"key":"Creator","value":"Acrobat PDFMaker 8.0 for Word"},"entry":{"key":"Producer","value":"Acrobat Distiller 8.0.0 (Windows)"},"entry":{"key":"CreationDate","value":"2008-01-14T10:41:15.000Z"},"entry":{"key":"ModDate","value":"2008-01-14T10:41:30.000Z"},"entry":{"key":"Company","value":" "}}}' + assert_output --partial '"featuresReport":{ + "informationDict" : { + "entry" : { + "key" : "Title", + "value" : "REPORT BY THE INDEPENDENT SCRUTINY PANEL" + }, + "entry" : { + "key" : "Author", + "value" : "Sandra McDougall" + }, + "entry" : { + "key" : "Creator", + "value" : "Acrobat PDFMaker 8.0 for Word" + }, + "entry" : { + "key" : "Producer", + "value" : "Acrobat Distiller 8.0.0 (Windows)" + }, + "entry" : { + "key" : "CreationDate", + "value" : "2008-01-14T10:41:15.000Z" + }, + "entry" : { + "key" : "ModDate", + "value" : "2008-01-14T10:41:30.000Z" + }, + "entry" : { + "key" : "Company", + "value" : " " + } + } +}' } diff --git a/CLI/Issues/1290/1290.bats b/CLI/Issues/1290/1290.bats index abe2926..6139427 100644 --- a/CLI/Issues/1290/1290.bats +++ b/CLI/Issues/1290/1290.bats @@ -76,18 +76,57 @@ setup() { run verapdf/verapdf $BATS_TEST_DIRNAME/inputs/. --debug --format json [ "$status" -eq 0 ] - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Japanese-日本.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Chinese-中國人.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Česká republika.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Русский.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Deutschland.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Arabic-عربي.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Hebrew-עִברִית.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./čeština.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Hindi-हिन्दी.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Română.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Magyarország.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Greek_Ελληνικά.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Japanese-日本.pdf" - assert_output --partial "{\"itemDetails\":{\"name\":\"$BATS_TEST_DIRNAME/inputs/./file-Slovensko.pdf" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Japanese-日本.pdf\", + \"size\" : 909 +}" + + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Chinese-中國人.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Česká republika.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Русский.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Deutschland.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Arabic-عربي.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Hebrew-עִברִית.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./čeština.pdf\", + \"size\" : 25683 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Hindi-हिन्दी.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Română.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Magyarország.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Greek_Ελληνικά.pdf\", + \"size\" : 909 +}" + assert_output --partial "{\"itemDetails\":{ + \"name\" : \"$BATS_TEST_DIRNAME/inputs/./file-Slovensko.pdf\", + \"size\" : 909 +}" } diff --git a/CLI/Issues/1308/1308.bats b/CLI/Issues/1308/1308.bats index 9fad61c..ca98d9c 100644 --- a/CLI/Issues/1308/1308.bats +++ b/CLI/Issues/1308/1308.bats @@ -12,8 +12,10 @@ setup() { run verapdf/verapdf --extract page --format json --off $BATS_TEST_DIRNAME/6.1.3-01-fail-5.pdf [ "$status" -eq 0 ] - assert_output --partial '"orderNumber":"1"' - assert_output --partial '"width":"300.000"' - assert_output --partial '"height":"400.000"' - assert_output --partial '"rotation":"0"' + + assert_output --partial '"orderNumber" : "1", + "width" : "300.000", + "height" : "400.000",' + + assert_output --partial '"rotation" : "0"' } diff --git a/CLI/Issues/1336/1336.bats b/CLI/Issues/1336/1336.bats index d2beedc..4516cbc 100644 --- a/CLI/Issues/1336/1336.bats +++ b/CLI/Issues/1336/1336.bats @@ -27,8 +27,13 @@ setup() { run $BATS_TEST_TMPDIR/verapdf $FILE_PATH/corruptionOneByteMissing.pdf --format json - assert_output --partial '"taskException":' - assert_output --partial "\"executed\":true,\"success\":false,\"exceptionMessage\":\"Exception: Couldn't parse stream caused by exception: Pages not found\"" + assert_output --partial "\"taskException\":{ + \"exception\" : \"Couldn't parse stream\"," + + assert_output --partial "\"executed\" : true, + \"success\" : false, + \"exceptionMessage\" : \"Exception: Couldn't parse stream caused by exception: Pages not found\"" + [ "$status" -eq 7 ] } diff --git a/CLI/Options/addlogs/addlogs.bats b/CLI/Options/addlogs/addlogs.bats index 58e23f6..4e013a8 100644 --- a/CLI/Options/addlogs/addlogs.bats +++ b/CLI/Options/addlogs/addlogs.bats @@ -44,8 +44,16 @@ logs_mrr_check() { logs_json_check() { echo "Running: $1" >&3 run verapdf/verapdf $FILE_PATH/$1 --addlogs --format json - assert_output --partial '{"occurrences":2,"level":"WARNING","message":"Value of ID is not an array of two byte strings"}' - assert_output --partial '{"occurrences":2,"level":"SEVERE","message":"Value of ID key is not a string. Ignoring ID"}' + assert_output --partial '{ + "occurrences" : 2, + "level" : "SEVERE", + "message" : "Value of ID key is not a string. Ignoring ID" + }' + assert_output --partial '{ + "occurrences" : 2, + "level" : "WARNING", + "message" : "Value of ID is not an array of two byte strings" + }' [ "$status" -eq 0 ] } diff --git a/CLI/Options/format/format.bats b/CLI/Options/format/format.bats index 6df1f1e..82e4665 100644 --- a/CLI/Options/format/format.bats +++ b/CLI/Options/format/format.bats @@ -103,9 +103,10 @@ format_html() { format_json() { echo "Running: $1" >&3 run verapdf/verapdf $FILE_PATH/$1 --format json - assert_output --partial '"jobEndStatus":"normal"' - assert_output --partial '"profileName":"PDF/A-2B validation profile"' - assert_output --partial '"statement":"PDF file is compliant with Validation Profile requirements."' - assert_output --partial '"compliant":true' + assert_output --partial '"jobEndStatus" : "normal", + "profileName" : "PDF/A-2B validation profile", + "statement" : "PDF file is compliant with Validation Profile requirements.", + "compliant" : true' + [ "$status" -eq 0 ] } diff --git a/CLI/Options/processes/processes.bats b/CLI/Options/processes/processes.bats index cab38e9..03ff63a 100644 --- a/CLI/Options/processes/processes.bats +++ b/CLI/Options/processes/processes.bats @@ -20,7 +20,7 @@ setup() { processes_check() { echo "Running: $1" >&3 run verapdf/verapdf $BATS_TEST_DIRNAME/a1.$1 $BATS_TEST_DIRNAME/a2.$1 $BATS_TEST_DIRNAME/a3.$1 $BATS_TEST_DIRNAME/a4.$1 --processes 2 --format json - assert_output --partial '"multiJob":false' - refute_output --partial '"multiJob":true' # expected is not present when using --processes + assert_output --partial '"multiJob" : false' + refute_output --partial '"multiJob" : true' # expected is not present when using --processes [ "$status" -eq 1 ] } diff --git a/CLI/Options/stdin/stdin.bats b/CLI/Options/stdin/stdin.bats index 45502dd..6ad0c36 100644 --- a/CLI/Options/stdin/stdin.bats +++ b/CLI/Options/stdin/stdin.bats @@ -24,5 +24,5 @@ setup() { @test "— Reading pdf from stdin & --format json option" { run echo $(cat $FILE_PATH/a.pdf | verapdf/verapdf --format json) - assert_output --partial '"jobs":[{"itemDetails":{"name":"STDIN","size":-1}' + assert_output --partial '"name" : "STDIN",' }