-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.bash
More file actions
executable file
·59 lines (47 loc) · 1.57 KB
/
test.bash
File metadata and controls
executable file
·59 lines (47 loc) · 1.57 KB
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
#!/bin/bash -xv
# SPDX-FileCopyrightText: 2023 Ryuichi Ueda ryuichiueda@gmail.com
# SPDX-License-Identifier: GPL-3.0-or-later
err () {
echo "ERROR!" FILE: $0, LINENO: $1
exit 1
}
export SUSH_COMPAT_TEST_MODE=0
cd $(dirname $0)
repo_dir=${1:-~/GIT/rusty_bash}
test_dir="$PWD"
com="$repo_dir/target/release/sush"
cd "$repo_dir"
cargo build || err $LINENO
cargo build --release || err $LINENO
cargo --version
cd "$test_dir"
: > error
: > ok
./test_job.bash nobuild "$repo_dir" &
./test_case.bash nobuild "$repo_dir" &
./test_substitution.bash nobuild "$repo_dir" &
./test_others.bash nobuild "$repo_dir" &
./test_redirects.bash nobuild "$repo_dir" &
./test_calculation.bash nobuild "$repo_dir" &
./test_compound.bash nobuild "$repo_dir" &
./test_brace.bash nobuild "$repo_dir" &
./test_builtins.bash nobuild "$repo_dir" &
./test_options.bash nobuild "$repo_dir" &
./test_parameters.bash nobuild "$repo_dir" &
./test_glob.bash nobuild "$repo_dir" &
./test_ansi_c_quoting.bash nobuild "$repo_dir" &
./test_fixed.bash nobuild "$repo_dir" &
./test_param_substitutions.bash nobuild "$repo_dir" &
./test_array.bash nobuild "$repo_dir" &
./test_fixed_v1.2.0.bash nobuild "$repo_dir" &
./test_fixed_v1.2.1.bash nobuild "$repo_dir" &
./test_fixed_v1.2.2.bash nobuild "$repo_dir" &
./test_fixed_v1.2.3.bash nobuild "$repo_dir" &
./test_fixed_v1.2.4.bash nobuild "$repo_dir" &
./test_fixed_v1.2.5.bash nobuild "$repo_dir" &
./test_fixed_v1.2.6.bash nobuild "$repo_dir" &
./test_fixed_v1.2.7.bash nobuild "$repo_dir" &
wait
head ./ok ./error
[ $(cat ./error | wc -l) == "0" ] || err $LINENO
echo OK $0