From 9468d2a769c726c9612f383f785501933f330232 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 18 Mar 2024 13:14:51 +0100 Subject: -update mustach --- src/templating/test6/Makefile | 7 +-- src/templating/test6/resu.ref | 93 ++++++++++++++++++++++++++++++++ src/templating/test6/test-custom-write.c | 2 + src/templating/test6/vg.ref | 14 +++++ 4 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 src/templating/test6/resu.ref create mode 100644 src/templating/test6/vg.ref (limited to 'src/templating/test6') 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 + + RESQUE REVIEWERS: AVREL COMMITERS: JOE WILLIAM + HUB REVIEWERS: AVREL COMMITERS: JACK GREG + RIP REVIEWERS: JOE JACK COMMITERS: GREG + + HI JON! + +===================================== + RESQUE REVIEWERS: AVREL COMMITERS: JOE WILLIAM + HUB REVIEWERS: AVREL COMMITERS: JACK GREG + RIP REVIEWERS: JOE JACK COMMITERS: GREG +===================================== +GGGGGGGGG +----3.14159---- +JJJJJJJJJ +END + +# +! +~ +~ +/ SEE JSON POINTERS IETF RFC 6901 +^ += +: +> +hello chris +you have just won 10000 dollars! +well, 6000 dollars, after taxes. +shown. + no person + + resque reviewers: avrel commiters: joe william + hub reviewers: avrel commiters: jack greg + rip reviewers: joe jack commiters: greg + + hi jon! + +===================================== + resque reviewers: avrel commiters: joe william + hub reviewers: avrel commiters: jack greg + rip reviewers: joe jack commiters: greg +===================================== +ggggggggg +----3.14159---- +jjjjjjjjj +end + +# +! +~ +~ +/ see json pointers ietf rfc 6901 +^ += +: +> +Hello Chris +You have just won 10000 dollars! +Well, 6000 dollars, after taxes. +Shown. + No person + + resque reviewers: avrel commiters: joe william + hub reviewers: avrel commiters: jack greg + rip reviewers: joe jack commiters: greg + + Hi Jon! + +===================================== + resque reviewers: avrel commiters: joe william + hub reviewers: avrel commiters: jack greg + rip reviewers: joe jack commiters: greg +===================================== +ggggggggg +----3.14159---- +jjjjjjjjj +end + +# +! +~ +~ +/ see json pointers IETF RFC 6901 +^ += +: +> 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 #include 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) -- cgit v1.2.3