Imported Upstream version 2.6.4
[platform/upstream/harfbuzz.git] / src / test-buffer-serialize.cc
index a91f4f7..6393f0b 100644 (file)
 
 #include <stdio.h>
 
+#ifdef HB_NO_OPEN
+#define hb_blob_create_from_file(x)  hb_blob_get_empty ()
+#endif
+
 int
 main (int argc, char **argv)
 {
+  bool ret = true;
+
+#ifndef HB_NO_BUFFER_SERIALIZE
+
   if (argc != 2) {
     fprintf (stderr, "usage: %s font-file\n", argv[0]);
     exit (1);
@@ -59,7 +67,6 @@ main (int argc, char **argv)
   hb_buffer_t *buf;
   buf = hb_buffer_create ();
 
-  bool ret = true;
   char line[BUFSIZ], out[BUFSIZ];
   while (fgets (line, sizeof(line), stdin) != nullptr)
   {
@@ -85,5 +92,7 @@ main (int argc, char **argv)
 
   hb_font_destroy (font);
 
+#endif
+
   return !ret;
 }