File: jsontestsuite.test

package info (click to toggle)
libfyaml 0.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,332 kB
  • sloc: ansic: 62,302; asm: 8,692; sh: 1,628; makefile: 581; python: 23
file content (72 lines) | stat: -rwxr-xr-x 1,237 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash

count=0

# count expected to pass
for f in json-test-suite-data/test_parsing/y_*.json; do
	count=`expr $count + 1`
done

# add expected to fail
for f in json-test-suite-data/test_parsing/n_*.json; do
	count=`expr $count + 1`
done

# add implementation defined
for f in json-test-suite-data/test_parsing/i_*.json; do
	count=`expr $count + 1`
done

# output plan
echo 1..$count

i=0

# expected to pass
for f in json-test-suite-data/test_parsing/y_*.json; do

	i=`expr $i + 1`
	tf=`basename $f`

	${TOP_BUILDDIR}/src/fy-tool --testsuite --streaming "$f" >/dev/null
	if [ $? -eq 0 ]; then
		res="ok"
	else
		res="not ok"
	fi

	echo "$res $i - $tf"
done

# expected to fail
for f in json-test-suite-data/test_parsing/n_*.json; do

	i=`expr $i + 1`
	tf=`basename $f`

	${TOP_BUILDDIR}/src/fy-tool --testsuite --streaming "$f" >/dev/null
	if [ $? -eq 0 ]; then
		res="not ok"
	else
		res="ok"
	fi

	echo "$res $i - $tf"
done

# implementation defined
for f in json-test-suite-data/test_parsing/i_*.json; do

	i=`expr $i + 1`
	tf=`basename $f`

	${TOP_BUILDDIR}/src/fy-tool --testsuite --streaming "$f" >/dev/null
	if [ $? -eq 0 ]; then
		ires="i-pass"
	else
		ires="i-fail"
	fi
	res="ok"

	echo "$res $i - $ires $tf"
done