diff options
Diffstat (limited to 'Userland/test-gfx-font.cpp')
-rw-r--r-- | Userland/test-gfx-font.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/test-gfx-font.cpp b/Userland/test-gfx-font.cpp index ccb0fd7e4b..151d8cea11 100644 --- a/Userland/test-gfx-font.cpp +++ b/Userland/test-gfx-font.cpp @@ -137,9 +137,10 @@ static void test_write_to_file() u8 glyph_width = 1; auto font = Gfx::Font::create(glyph_height, glyph_width, true, Gfx::FontTypes::Default); - const char* font_path = "/tmp/new.font"; - assert(font->write_to_file(font_path)); - unlink(font_path); + char path[] = "/tmp/new.font.XXXXXX"; + assert(mkstemp(path) != -1); + assert(font->write_to_file(path)); + unlink(path); } int main(int, char**) |