blob: 0da51dae8a9d2245ec2032c357ff57303b0e65c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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();
}
|