forked from GambitBSM/gambit-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfuncs.bats
More file actions
44 lines (35 loc) · 1015 Bytes
/
funcs.bats
File metadata and controls
44 lines (35 loc) · 1015 Bytes
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
#!/usr/bin/env bats
#
# Tests of helper functions in BATS framework. See e.g. https://github.com/sstephenson/bats
#
# Written by A. Fowlie.
# GAMBIT helper functions to be tested.
load funcs
setup() {
:
}
# Echo information on teardown, if error
teardown() {
error "$output"
}
# BAT framework tests - make information as descriptive as possible.
@test "identical files using id_ascii_files" {
run id_ascii_files ./data_expected/id_1.dat ./data_expected/id_2.dat 0.
[ $status = 0 ]
}
@test "differing files using id_ascii_files" {
run id_ascii_files ./data_expected/id_1.dat ./data_expected/diff.dat 0.
[ $status = 1 ]
}
@test "throw error differing files using id_ascii_files" {
skip "This is supposed to fail - test that fails work"
run id_ascii_files ./data_expected/id_1.dat ./data_expected/diff.dat 0.
[ $status = 0 ]
}
@test "nonexistent files using id_ascii_files" {
run id_ascii_files no.dat ./data_expected/diff.dat 0.
[ $status = 255 ]
}
@test "special char _ * . -" {
:
}