diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gdimagestringft/bug00615.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/tests/gdimagestringft/bug00615.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagestringft/bug00615.c b/Build/source/libs/gd/libgd-src/tests/gdimagestringft/bug00615.c new file mode 100644 index 00000000000..0da51dae8a9 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/tests/gdimagestringft/bug00615.c @@ -0,0 +1,25 @@ +/** + * Test that rendering an empty string does not fail + * + * Rendering an empty string with gdImageStringFT() is not supposed to fail; + * it is just a no-op. + * + * See <https://github.com/libgd/libgd/issues/615> + */ + +#include "gd.h" +#include "gdtest.h" + +int main() +{ + gdImagePtr im = gdImageCreate(100, 100); + + int rect[8]; + int fg = gdImageColorAllocate(im, 255, 255, 255); + char *path = gdTestFilePath("freetype/DejaVuSans.ttf"); + char *res = gdImageStringFT(im, rect, fg, path, 12, 0, 10, 10, ""); + + gdTestAssert(res == NULL); + + return gdNumFailures(); +} |