Commit b87c6ecc authored by josé bollo's avatar josé bollo

add second test

Change-Id: Ibe76edc1dd1bb4389b3476c475b578d48a1d0f30
Signed-off-by: josé bollo's avatarJosé Bollo <jose.bollo@iot.bzh>
parent a2bf5d4a
......@@ -6,9 +6,11 @@ mustach: mustach-tool.c mustach.c mustach.h mustach-json-c.c mustach-json-c.
test: mustach
@make -C test1 test
@make -C test2 test
clean:
rm -f mustach
@make -C test1 clean
@make -C test2 clean
resu.last
vg.last
.PHONY: test clean
test: ../mustach
@echo starting test
@valgrind ../mustach json must > resu.last 2> vg.last
@sed -i 's:^==[0-9]*== ::' vg.last
@diff resu.ref resu.last && echo "result ok" || echo "ERROR! Result differs"
@diff vg.ref vg.last && echo "memory ok" || echo "ERROR! Memory differs"
clean:
rm -f resu.last vg.last
{
"header": "Colors",
"items": [
{"name": "red", "first": true, "url": "#Red"},
{"name": "green", "link": true, "url": "#Green"},
{"name": "blue", "link": true, "url": "#Blue"}
],
"empty": false
}
<h1>{{header}}</h1>
{{#bug}}
{{/bug}}
{{#items}}
{{#first}}
<li><strong>{{name}}</strong></li>
{{/first}}
{{#link}}
<li><a href="{{url}}">{{name}}</a></li>
{{/link}}
{{/items}}
{{#empty}}
<p>The list is empty.</p>
{{/empty}}
<h1>Colors</h1>
<li><strong>red</strong></li>
<li><a href="#Green">green</a></li>
<li><a href="#Blue">blue</a></li>
Memcheck, a memory error detector
Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
Command: ../mustach json must
HEAP SUMMARY:
in use at exit: 0 bytes in 0 blocks
total heap usage: 67 allocs, 67 frees, 9,757 bytes allocated
All heap blocks were freed -- no leaks are possible
For counts of detected and suppressed errors, rerun with: -v
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment