Skip to content

Commit

Permalink
fix image test extension
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Oct 31, 2023
1 parent bfbe52d commit 3a1f7ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -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
13 changes: 10 additions & 3 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3a1f7ac

Please sign in to comment.