summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c')
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c b/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c
new file mode 100644
index 00000000000..f91485b7717
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/tests/gdimagestringftex/gdimagestringftex_returnfontpathname.c
@@ -0,0 +1,22 @@
+#include <string.h>
+#include "gd.h"
+#include "gdtest.h"
+
+int main()
+{
+ gdFTStringExtra strex;
+ char path[2048];
+
+ sprintf(path, "%s/freetype/DejaVuSans.ttf", GDTEST_TOP_DIR);
+ strex.flags = gdFTEX_RETURNFONTPATHNAME;
+ strex.fontpath = NULL;
+ gdImageStringFTEx(NULL, NULL, 0, path, 72, 0, 0, 0, "hello, gd", &strex);
+ if (!strex.fontpath) {
+ return 1;
+ }
+ if (strcmp(path, strex.fontpath) != 0) {
+ return 2;
+ }
+ gdFree(strex.fontpath);
+ return 0;
+}