summaryrefslogtreecommitdiffstats
path: root/tests/250-symbols/symtab-parser-000.sh
blob: a1fea02a8b343f9c9ce40be3853b62622cf3b3de (plain)
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
# symtab parser tests

sh_test()
{
	local interpreter="$1"

	cd "$rootdir" || die "Failed to change to rootdir '$rootdir'"


	# Print help text
	"$interpreter" ./awlsim-symtab -h >/dev/null ||\
		test_failed "Call to awlsim-symtab -h failed"


	# Test CSV input
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I auto -O csv - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I auto -O csv failed"
Merker 1;M 0.0;BOOL;Symbol 1
Merker 2;M 0.1;BOOL;Symbol 2
EOF
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I csv -O csv - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I csv -O csv failed"
Merker 1;M 0.0;BOOL;Symbol 1
Merker 2;M 0.1;BOOL;Symbol 2
EOF
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I csv -O readable-csv - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I csv -O readable-csv failed"
Merker 1;M 0.0;BOOL;Symbol 1
Merker 2;M 0.1;BOOL;Symbol 2
EOF
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I csv -O asc - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I csv -O asc failed"
Merker 1;M 0.0;BOOL;Symbol 1
Merker 2;M 0.1;BOOL;Symbol 2
EOF


	# Test ASC input
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I auto -O asc - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I auto -O asc failed"
126,Merker 1                M       0.0 BOOL      Symbol 1                                                                        
126,Merker 2                M       0.1 BOOL      Symbol 2                                                                        
EOF
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I asc -O asc - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I asc -O asc failed"
126,Merker 1                M       0.0 BOOL      Symbol 1                                                                        
126,Merker 2                M       0.1 BOOL      Symbol 2                                                                        
EOF
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I asc -O csv - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I asc -O csv failed"
126,Merker 1                M       0.0 BOOL      Symbol 1                                                                        
126,Merker 2                M       0.1 BOOL      Symbol 2                                                                        
EOF
	cat << EOF |\
	"$interpreter" ./awlsim-symtab -I asc -O readable-csv - - >/dev/null ||\
		test_failed "Call to awlsim-symtab -I asc -O readable-csv failed"
126,Merker 1                M       0.0 BOOL      Symbol 1                                                                        
126,Merker 2                M       0.1 BOOL      Symbol 2                                                                        
EOF

}
bues.ch cgit interface