summaryrefslogtreecommitdiff
path: root/src/templating/test6
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-03-18 13:14:51 +0100
committerChristian Grothoff <christian@grothoff.org>2024-03-18 13:30:24 +0100
commit9468d2a769c726c9612f383f785501933f330232 (patch)
tree7a4f0bedd2ed9ee18d56d2391991cf84f52bcbb7 /src/templating/test6
parent8a6d67a3178bad3ae0c0d01bed8c36b3a1e9b7b8 (diff)
downloadexchange-9468d2a769c726c9612f383f785501933f330232.tar.gz
exchange-9468d2a769c726c9612f383f785501933f330232.tar.bz2
exchange-9468d2a769c726c9612f383f785501933f330232.zip
-update mustach
Diffstat (limited to 'src/templating/test6')
-rw-r--r--src/templating/test6/Makefile7
-rw-r--r--src/templating/test6/resu.ref93
-rw-r--r--src/templating/test6/test-custom-write.c2
-rw-r--r--src/templating/test6/vg.ref14
4 files changed, 110 insertions, 6 deletions
diff --git a/src/templating/test6/Makefile b/src/templating/test6/Makefile
index 6178902c0..ea4f86e79 100644
--- a/src/templating/test6/Makefile
+++ b/src/templating/test6/Makefile
@@ -5,12 +5,7 @@ test-custom-write: test-custom-write.c ../mustach-json-c.h ../mustach-json-c.c .
$(CC) $(CFLAGS) $(LDFLAGS) -g -o test-custom-write test-custom-write.c ../mustach.c ../mustach-json-c.c ../mustach-wrap.c -ljson-c
test: test-custom-write
- @echo starting test
- @./test-custom-write json -U must -l must -x must > resu.last 2> vg.last
- @sed -i 's:^==[0-9]*== ::' vg.last
- @diff -w resu.ref resu.last && echo "result ok" || echo "ERROR! Result differs"
- @awk '/^ *total heap usage: .* allocs, .* frees,.*/{if($$4-$$6)exit(1)}' vg.last || echo "ERROR! Alloc/Free issue"
- @echo
+ @mustach=./test-custom-write ../dotest.sh json -U must -l must -x must
clean:
rm -f resu.last vg.last test-custom-write
diff --git a/src/templating/test6/resu.ref b/src/templating/test6/resu.ref
new file mode 100644
index 000000000..377eb11af
--- /dev/null
+++ b/src/templating/test6/resu.ref
@@ -0,0 +1,93 @@
+HELLO CHRIS
+YOU HAVE JUST WON 10000 DOLLARS!
+WELL, 6000 DOLLARS, AFTER TAXES.
+SHOWN.
+ NO PERSON
+
+ <B>RESQUE</B> REVIEWERS: AVREL COMMITERS: JOE WILLIAM
+ <B>HUB</B> REVIEWERS: AVREL COMMITERS: JACK GREG
+ <B>RIP</B> REVIEWERS: JOE JACK COMMITERS: GREG
+
+ HI JON!
+
+=====================================
+ <B>RESQUE</B> REVIEWERS: AVREL COMMITERS: JOE WILLIAM
+ <B>HUB</B> REVIEWERS: AVREL COMMITERS: JACK GREG
+ <B>RIP</B> REVIEWERS: JOE JACK COMMITERS: GREG
+=====================================
+GGGGGGGGG
+----3.14159----
+JJJJJJJJJ
+END
+
+#
+!
+~
+~
+/ SEE JSON POINTERS IETF RFC 6901
+^
+=
+:
+&GT;
+hello chris
+you have just won 10000 dollars!
+well, 6000 dollars, after taxes.
+shown.
+ no person
+
+ <b>resque</b> reviewers: avrel commiters: joe william
+ <b>hub</b> reviewers: avrel commiters: jack greg
+ <b>rip</b> reviewers: joe jack commiters: greg
+
+ hi jon!
+
+=====================================
+ <b>resque</b> reviewers: avrel commiters: joe william
+ <b>hub</b> reviewers: avrel commiters: jack greg
+ <b>rip</b> reviewers: joe jack commiters: greg
+=====================================
+ggggggggg
+----3.14159----
+jjjjjjjjj
+end
+
+#
+!
+~
+~
+/ see json pointers ietf rfc 6901
+^
+=
+:
+&gt;
+Hello Chris
+You have just won 10000 dollars!
+Well, 6000 dollars, after taxes.
+Shown.
+ No person
+
+ <b>resque</b> reviewers: avrel commiters: joe william
+ <b>hub</b> reviewers: avrel commiters: jack greg
+ <b>rip</b> reviewers: joe jack commiters: greg
+
+ Hi Jon!
+
+=====================================
+ <b>resque</b> reviewers: avrel commiters: joe william
+ <b>hub</b> reviewers: avrel commiters: jack greg
+ <b>rip</b> reviewers: joe jack commiters: greg
+=====================================
+ggggggggg
+----3.14159----
+jjjjjjjjj
+end
+
+#
+!
+~
+~
+/ see json pointers IETF RFC 6901
+^
+=
+:
+&gt;
diff --git a/src/templating/test6/test-custom-write.c b/src/templating/test6/test-custom-write.c
index 4ba953a85..20042c1ed 100644
--- a/src/templating/test6/test-custom-write.c
+++ b/src/templating/test6/test-custom-write.c
@@ -16,7 +16,9 @@
limitations under the License.
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <stdlib.h>
#include <stdio.h>
diff --git a/src/templating/test6/vg.ref b/src/templating/test6/vg.ref
new file mode 100644
index 000000000..fb0e31bd8
--- /dev/null
+++ b/src/templating/test6/vg.ref
@@ -0,0 +1,14 @@
+Memcheck, a memory error detector
+Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
+Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
+Command: ./test-custom-write json -U must -l must -x must
+
+
+HEAP SUMMARY:
+ in use at exit: 0 bytes in 0 blocks
+ total heap usage: 174 allocs, 174 frees, 24,250 bytes allocated
+
+All heap blocks were freed -- no leaks are possible
+
+For lists of detected and suppressed errors, rerun with: -s
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)