]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/ktap/test/if.kp
3122084af5eea0cf21399fc02080ac5d1c19b20e
[karo-tx-linux.git] / drivers / staging / ktap / test / if.kp
1 #!/usr/bin/env ktap
2
3 function failed() {
4         printf("failed\n");
5         exit(-1);
6 }
7
8 #-----------------------------------------#
9
10 if (false) {
11         failed()
12 }
13
14 if (nil) {
15         failed()
16 }
17
18 # ktap only think false and nil is "real false", number 0 is true
19 # it's same as lua
20 # Might change it in future, to make similar with C
21 if (0) {
22         #failed()
23 }
24