summaryrefslogtreecommitdiff
path: root/dev/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev/main.c')
-rw-r--r--dev/main.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/dev/main.c b/dev/main.c
new file mode 100644
index 0000000..ca87816
--- /dev/null
+++ b/dev/main.c
@@ -0,0 +1,31 @@
+/*
+ * This file is part of LibNSLayout's tests
+ * Licensed under the ISC License, http://opensource.org/licenses/ISC
+ * Copyright 2015 Michael Drake <tlsa@netsurf-browser.org>
+ */
+
+#include "../test/test-loader.c"
+
+/*
+ * cd ../ && make && make install && cd dev/ && gcc `pkg-config libnslayout --cflags` main.c `pkg-config libnslayout --libs` && ./a.out ; cd ~/dev-netsurf/workspace/libnslayout/dev
+ */
+
+
+static void lwc_iterator(lwc_string *str, void *pw)
+{
+ printf("[%3u] %.*s", str->refcnt,
+ (int)lwc_string_length(str),
+ lwc_string_data(str));
+}
+
+int main(void)
+{
+ nslayout_init();
+ test_loader("test-writing-mode.html", CSS_MEDIA_ALL, 15);
+ nslayout_fini();
+
+ printf("Reamining lwc strings:\n");
+ lwc_iterate_strings(lwc_iterator, NULL);
+
+ return EXIT_SUCCESS;
+}