File: unittest.sh

package info (click to toggle)
libjsonparser 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 1,008 kB
  • sloc: ansic: 1,139; python: 68; makefile: 59; sh: 15
file content (17 lines) | stat: -rwxr-xr-x 296 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e

cd tests
gcc -o test_json -I.. ../examples/test_json.c -lm -ljsonparser
for i in invalid-*.json; do
  if ./test_json $i > /dev/null 2>&1 ; then
    exit 1
  fi
done
for i in valid-*.json; do
  if ! ./test_json $i > /dev/null 2>&1 ; then
    exit 1
  fi
done
rm test_json
exit 0