-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.json
134 lines (134 loc) · 3.62 KB
/
tests.json
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[
{
"name": "Basic tests: empty",
"commands": [],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "Basic tests: segv",
"commands": ["ts/segv"],
"sleeptime": -1,
"override_excode": 139
},
{
"name": "Basic tests: Simple exec",
"commands": ["id"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "Basic tests: Run simple commands",
"commands": ["ls -lah /home", "pwd", "id"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "Basic tests: wrong command",
"commands": ["exitt"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "Path handling: Path 1",
"commands": ["ls -lah /home", "setenv fraise desbois", "ts/simple_pathtest"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "Path handling: Path 2",
"commands": ["ts/simple_pathtest"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "Path/env handling: path 3 error handling",
"commands": ["echo $fraise"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "setenv and unsetenv",
"commands": ["echo $fraise", "setenv fraise desbois", "echo $fraise", "ts/simple_pathtest", "unsetenv fraise", "ts/simple_pathtest"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "unsetenv: no args",
"commands": ["unsetenv"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "setenv: error handling",
"commands": ["setenv ok=2", "setenv @PATH 4", "setenv ILOVESTRAWBERRIES ANDYOU YES"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "cd: basic cd test",
"commands": ["pwd", "cd /tmp", "pwd", "cd /usr/local/share", "pwd", "cd ..", "pwd"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "cd: error handling",
"commands": ["cd tests.json", "pwd", "cd /unknownfile", "pwd", "cd /bin/bash", "pwd", "cd /boot", "pwd"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "cd: cd -",
"commands": ["pwd", "cd /tmp", "pwd", "cd -", "pwd", "cd /var", "pwd", "cd -", "pwd", "cd -", "pwd"],
"sleeptime": 0.5,
"override_excode": -1
},
{
"name": "line formatting: space 1",
"commands": [" ls /tmp"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "line formatting: space 2",
"commands": [" ls /tmp"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "line formatting: space 3",
"commands": [" ls -l /tmp"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "line formatting: spaces & tabs",
"commands": ["\t ls \t\t \t -l\t/tmp"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "error handling: Bin not compatible",
"commands": ["ts/binerr"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "error handling: DivZero",
"commands": ["ts/divzero"],
"sleeptime": -1,
"override_excode": -1
},
{
"name": "error handling: segfault",
"commands": ["ts/segv"],
"sleeptime": -1,
"override_excode": 139
},
{
"name": "error handling: exec a directory",
"commands": ["ts/", "./ts", "./ts/"],
"sleeptime": 0.5,
"override_excode": -1
}
]