Skip to content

Commit cec4307

Browse files
committed
Add more tests
1 parent 089a614 commit cec4307

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

tests/test_start_ursim.bats

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,58 @@ setup() {
119119
[ "$ROBOT_SERIES" = "polyscopex" ]
120120
}
121121

122+
@test "no arguments results in e-series ur5e" {
123+
test_input_handling
124+
[ "$ROBOT_MODEL" = "ur5e" ]
125+
[ "$ROBOT_SERIES" = "e-series" ]
126+
[ "$URSIM_VERSION" = "latest" ]
127+
}
128+
129+
@test "test ur20 min version" {
130+
run test_input_handling -m ur20 -v 3.14.3
131+
echo "$output"
132+
[ $status -eq 1 ]
133+
run test_input_handling -m ur20 -v 5.13.9
134+
echo "$output"
135+
[ $status -eq 1 ]
136+
run test_input_handling -m ur20 -v 5.14.0
137+
echo "$output"
138+
[ $status -eq 0 ]
139+
run test_input_handling -m ur20 -v 10.7.0
140+
echo "$output"
141+
[ $status -eq 0 ]
142+
}
143+
144+
@test "test ur30 min version" {
145+
run test_input_handling -m ur30 -v 3.14.3
146+
echo "$output"
147+
[ $status -eq 1 ]
148+
run test_input_handling -m ur30 -v 5.14.9
149+
echo "$output"
150+
[ $status -eq 1 ]
151+
run test_input_handling -m ur30 -v 5.15.0
152+
echo "$output"
153+
[ $status -eq 0 ]
154+
run test_input_handling -m ur30 -v 10.7.0
155+
echo "$output"
156+
[ $status -eq 0 ]
157+
}
158+
159+
@test "unsupported versions raise error" {
160+
run main -v 1.2.3 -t
161+
echo "$output"
162+
[ $status -eq 1 ]
163+
run main -v 2.0.0 -t
164+
echo "$output"
165+
[ $status -eq 1 ]
166+
run main -v 10.1.0 -t
167+
echo "$output"
168+
[ $status -eq 1 ]
169+
run main -v 6.99.123 -t
170+
echo "$output"
171+
[ $status -eq 1 ]
172+
}
173+
122174
@test "docker image polyscopex" {
123175
run main -v 10.7.0 -t
124176
echo "$output"

0 commit comments

Comments
 (0)