diff options
author | James Gregory <james@james.id.au> | 2013-08-19 14:01:32 -0700 |
---|---|---|
committer | James Gregory <james@james.id.au> | 2013-08-19 14:01:32 -0700 |
commit | afcdfff09f8557ce6810546628733f48d6c45408 (patch) | |
tree | 9c556c29a0556429dc1b421b2d5abade1915a034 /tests/sdl_image.c | |
parent | 46c82708d50e839945fa24094fe352241be6a22e (diff) | |
parent | cd38275faf739ba151c0aa7abe13703c9b8d8235 (diff) |
Merge remote-tracking branch 'origin/incoming' into touch_handling
Diffstat (limited to 'tests/sdl_image.c')
-rw-r--r-- | tests/sdl_image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/sdl_image.c b/tests/sdl_image.c index 9d8c36f2..523f8903 100644 --- a/tests/sdl_image.c +++ b/tests/sdl_image.c @@ -3,6 +3,7 @@ #include <SDL/SDL_image.h> #include <assert.h> #include <emscripten.h> +#include <unistd.h> int testImage(SDL_Surface* screen, const char* fileName) { SDL_Surface *image = IMG_Load(fileName); @@ -27,9 +28,12 @@ int main() { SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_SWSURFACE); int result = 0; - result = testImage(screen, "screenshot.jpg"); // relative path + + result |= testImage(screen, SCREENSHOT_DIRNAME "/" SCREENSHOT_BASENAME); // absolute path assert(result != 0); - result |= testImage(screen, "/screenshot.jpg"); // absolute path + + chdir(SCREENSHOT_DIRNAME); + result = testImage(screen, "./" SCREENSHOT_BASENAME); // relative path assert(result != 0); SDL_Flip(screen); |