summaryrefslogtreecommitdiff
path: root/drivers/staging/ktap/test/if.kp
blob: 3122084af5eea0cf21399fc02080ac5d1c19b20e (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
#!/usr/bin/env ktap

function failed() {
	printf("failed\n");
	exit(-1);
}

#-----------------------------------------#

if (false) {
	failed()
}

if (nil) {
	failed()
}

# ktap only think false and nil is "real false", number 0 is true
# it's same as lua
# Might change it in future, to make similar with C
if (0) {
	#failed()
}