diff --git a/tests/expected/auto/mb_jpg_0_0_0.png b/tests/expected/auto/mb_jpg_0_0_0.jpg similarity index 100% rename from tests/expected/auto/mb_jpg_0_0_0.png rename to tests/expected/auto/mb_jpg_0_0_0.jpg diff --git a/tests/expected/auto/mb_jpg_0_0_0.png.txt b/tests/expected/auto/mb_jpg_0_0_0.jpg.txt similarity index 60% rename from tests/expected/auto/mb_jpg_0_0_0.png.txt rename to tests/expected/auto/mb_jpg_0_0_0.jpg.txt index 9bdac2a77..daa75c631 100644 --- a/tests/expected/auto/mb_jpg_0_0_0.png.txt +++ b/tests/expected/auto/mb_jpg_0_0_0.jpg.txt @@ -1 +1 @@ -tests/output/auto/mb_jpg_0_0_0.png: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 256x256, components 3 +tests/output/auto/mb_jpg_0_0_0.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 256x256, components 3 diff --git a/tests/test.sh b/tests/test.sh index 2ea687448..83a399716 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -86,7 +86,8 @@ test_pbf() test_png() { - FILENAME="$TEST_OUT_DIR/$1.png" + # 3rd argument is optional, .png by default + FILENAME="$TEST_OUT_DIR/$1.${3:-png}" URL="$MARTIN_URL/$2" echo "Testing $(basename "$FILENAME") from $URL" @@ -97,13 +98,19 @@ test_png() fi } +test_jpg() +{ + test_png $1 $2 jpg +} + + test_font() { FILENAME="$TEST_OUT_DIR/$1.pbf" URL="$MARTIN_URL/$2" echo "Testing $(basename "$FILENAME") from $URL" - $CURL "$URL" > "$FILENAME" + $CURL "$URL" > "$FILENAME" } # Delete a line from a file $1 that matches parameter $2 @@ -230,7 +237,7 @@ test_png pmt_3_4_2 stamen_toner__raster_CC-BY-ODbL_z3/3/4/2 >&2 echo "***** Test server response for MbTiles source *****" test_jsn mb_jpg geography-class-jpg -test_png mb_jpg_0_0_0 geography-class-jpg/0/0/0 +test_jpg mb_jpg_0_0_0 geography-class-jpg/0/0/0 test_jsn mb_png geography-class-png test_png mb_png_0_0_0 geography-class-png/0/0/0 test_jsn mb_mvt world_cities