Skip to content

Commit e1bad31

Browse files
committed
Update spec files
1 parent 2ec6730 commit e1bad31

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

spec/common-option_spec.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
eval "$(shellspec - -c) exit 1"
3030

31-
Include 'lib/sysexits.sh'
32-
3331
% TESTFILES: 'bin/past-exam-question-to-csv.sh bin/word-quiz-to-csv.sh'
3432

3533
version_check() {
@@ -42,6 +40,17 @@ version_check() {
4240
' "${version_check}" "${1}"
4341
}
4442

43+
Describe 'ShellCheck による検証'
44+
Parameters:value ${TESTFILES}
45+
46+
Example "shellcheck --severity=error -- ${1}"
47+
When call shellcheck --severity=error "${1}"
48+
The length of stdout should equal 0
49+
The length of stderr should equal 0
50+
The status should equal 0
51+
End
52+
End
53+
4554
Describe '-h, --help の検証'
4655
Parameters:matrix
4756
${TESTFILES}

spec/past-exam-question-to-csv_spec.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
eval "$(shellspec - -c) exit 1"
3030

31-
Include 'lib/sysexits.sh'
32-
3331
% TESTFILE: 'bin/past-exam-question-to-csv.sh'
3432

3533
Describe '書き込み不可へのアウトプットの検証'

spec/spec_helper.sh

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1-
#shellcheck shell=sh
1+
### File: spec_helper.sh
2+
##
3+
## ShellSpec 用の共通ヘルパーファイル。
4+
##
5+
## Metadata:
6+
##
7+
## id - 375430d1-9d1c-4cab-b338-2ec80299b252
8+
## author - <qq542vev at https://purl.org/meta/me/>
9+
## version - 1.0.0
10+
## date - 2023-07-25
11+
## since - 2023-07-12
12+
## copyright - Copyright (C) 2023-2023 qq542vev. Some rights reserved.
13+
## license - <CC-BY at https://creativecommons.org/licenses/by/4.0/>
14+
## package - convert-it-passport
15+
##
16+
## See Also:
17+
##
18+
## * <Project homepage at https://github.com/qq542vev/convert-it-passport>
19+
## * <Bag report at https://github.com/qq542vev/convert-it-passport/issues>
220

3-
# set -eu
21+
set -efu
422

5-
# shellspec_spec_helper_configure() {
6-
# shellspec_import 'support/custom_matcher'
7-
# }
23+
24+
. 'lib/sysexits.sh'
825

926
md5checksum() {
1027
[ "$(printf '%s\n' "${md5checksum}" | md5sum | cut -d ' ' -f 1)" = "$(cut -d ' ' -f 1 -- "spec/checksum/${1}.md5sum")" ]

spec/word-quiz-to-csv_spec.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
eval "$(shellspec - -c) exit 1"
3030

31-
Include 'lib/sysexits.sh'
32-
3331
% TESTFILE: 'bin/word-quiz-to-csv.sh'
3432

3533
Describe '書き込み不可へのアウトプットの検証'

0 commit comments

Comments
 (0)