Skip to content

Commit 5778bc7

Browse files
committed
Update spec files
1 parent bba002e commit 5778bc7

File tree

5 files changed

+65
-65
lines changed

5 files changed

+65
-65
lines changed

spec/opensearch-base_spec.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### File: opensearch-base_spec.sh
44
##
5-
## opensearch のテスト
5+
## opensearch の検証
66
##
77
## Usage:
88
##
@@ -13,22 +13,22 @@
1313
## Metadata:
1414
##
1515
## id - aede3d0a-b8af-4424-ab5e-a2b33fd4304c
16-
## author - qq542vev <https://purl.org/meta/me/>
16+
## author - <qq542vev at https://purl.org/meta/me/>
1717
## version - 1.0.0
18-
## date - 2022-12-01
18+
## date - 2022-12-11
1919
## since - 2022-11-20
2020
## copyright - Copyright (C) 2022 qq542vev. Some rights reserved.
21-
## license - CC-BY <https://creativecommons.org/licenses/by/4.0/>
21+
## license - <CC-BY at https://creativecommons.org/licenses/by/4.0/>
2222
## package - shell-opensearch
2323
##
2424
## See Also:
2525
##
26-
## * Project homepage - <https://github.com/qq542vev/shell-opensearch>
27-
## * Bag report - <https://github.com/qq542vev/shell-opensearch/issues>
26+
## * <Project homepage at https://github.com/qq542vev/shell-opensearch>
27+
## * <Bag report at https://github.com/qq542vev/shell-opensearch/issues>
2828

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

31-
Describe 'opensearch base test'
31+
Describe 'opensearch の検証'
3232
Parameters:block
3333
'' '1' '' '0'
3434
'-c ./spec/.shell-opensearch' '1' '' '0'
@@ -39,7 +39,7 @@ Describe 'opensearch base test'
3939
'nil' '' '1' '64'
4040
End
4141

42-
Example "./openseaarch '${1}'"
42+
Example "openseaarch ${1}"
4343
When call ./opensearch ${1}
4444
The length of stdout should ${2:+'not'} eq 0
4545
The length of stderr should ${3:+'not'} eq 0

spec/opensearch-contact_spec.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### File: opensearch-contact_spec.sh
44
##
5-
## opensearch contact のテスト
5+
## opensearch contact の検証
66
##
77
## Usage:
88
##
@@ -13,22 +13,22 @@
1313
## Metadata:
1414
##
1515
## id - 043438cc-6314-4ea0-a726-a65a58fe275e
16-
## author - qq542vev <https://purl.org/meta/me/>
16+
## author - <qq542vev at https://purl.org/meta/me/>
1717
## version - 1.0.0
18-
## date - 2022-12-01
18+
## date - 2022-12-11
1919
## since - 2022-11-23
2020
## copyright - Copyright (C) 2022 qq542vev. Some rights reserved.
21-
## license - CC-BY <https://creativecommons.org/licenses/by/4.0/>
21+
## license - <CC-BY at https://creativecommons.org/licenses/by/4.0/>
2222
## package - shell-opensearch
2323
##
2424
## See Also:
2525
##
26-
## * Project homepage - <https://github.com/qq542vev/shell-opensearch>
27-
## * Bag report - <https://github.com/qq542vev/shell-opensearch/issues>
26+
## * <Project homepage at https://github.com/qq542vev/shell-opensearch>
27+
## * <Bag report at https://github.com/qq542vev/shell-opensearch/issues>
2828

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

31-
Describe 'opensearch contact test'
31+
Describe 'opensearch contact の検証'
3232
email_check() {
3333
eval "set -- ${1}"
3434

@@ -57,28 +57,28 @@ Describe 'opensearch contact test'
5757

5858
BeforeAll 'setup'
5959

60-
Example 'Option: -h'
60+
Example 'ヘルプの検証: -h'
6161
When call ./opensearch contact -h
6262
The length of stdout should not eq 0
6363
The length of stderr should eq 0
6464
The status should eq 0
6565
End
6666

67-
Example 'Option: --nil'
67+
Example '無効なオプションの検証: --nil'
6868
When call ./opensearch contact --nil
6969
The length of stdout should eq 0
7070
The length of stderr should not eq 0
7171
The status should eq 64
7272
End
7373

74-
Example '2個以上の引数'
74+
Example '2個以上の引数の検証'
7575
When call ./opensearch contact simple detailed
7676
The length of stdout should eq 0
7777
The length of stderr should not eq 0
7878
The status should eq 64
7979
End
8080

81-
Describe '基本となるテスト'
81+
Describe '各種 OpenSearch ファイルによる検証'
8282
Parameters:block
8383
'minimum' '' '1' '65'
8484
'simple' "${email}" '' '0'
@@ -99,15 +99,15 @@ Describe 'opensearch contact test'
9999
'./spec/.shell-opensearch/nil.xml' '' '1' '65'
100100
End
101101

102-
Example "オプションなしのテスト: '${1}'"
102+
Example "オプションなしの検証: '${1}'"
103103
When call ./opensearch -c "${configDir}" contact "${1}"
104104
The lines of stdout should eq "$(eval "set -- ${2}"; printf '%d' "${#}")"
105105
The stdout should satisfy email_check "${2}"
106106
The length of stderr should ${3:+'not'} eq 0
107107
The status should eq "${4}"
108108
End
109109

110-
Example "--extarnal のテスト: '${1}'"
110+
Example "--extarnal の検証: '${1}'"
111111
When call env 'MAILER=echo' ./opensearch -c "${configDir}" contact -e "${1}"
112112
The lines of stdout should eq "$(eval "set -- ${2}"; printf '%d' "$((1 <= ${#}))")"
113113
The length of stderr should ${3:+'not'} eq 0
@@ -122,7 +122,7 @@ Describe 'opensearch contact test'
122122
End
123123
End
124124

125-
Describe '--skip-error を有効にする'
125+
Describe '--skip-error を有効にして各種 OpenSearch ファイルを検証'
126126
127127
Parameters:block
128128
'success/' "${email} ${email}" '' '0'
@@ -135,7 +135,7 @@ Describe 'opensearch contact test'
135135
'draft2,nil' '' '1' '65'
136136
End
137137

138-
Example "--skip-error のテスト: '${1}'"
138+
Example "--skip-error の検証: '${1}'"
139139
When call ./opensearch -c "${configDir}" contact -s "${1}"
140140
The lines of stdout should eq "$(eval "set -- ${2}"; printf '%d' "${#}")"
141141
The stdout should satisfy email_check "${2}"

spec/opensearch-list_spec.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### File: opensearch-list_spec.sh
44
##
5-
## opensearch list のテスト
5+
## opensearch list の検証
66
##
77
## Usage:
88
##
@@ -13,22 +13,22 @@
1313
## Metadata:
1414
##
1515
## id - 014b85b1-d15b-497f-9887-8b30e24ffb2b
16-
## author - qq542vev <https://purl.org/meta/me/>
16+
## author - <qq542vev at https://purl.org/meta/me/>
1717
## version - 1.0.0
18-
## date - 2022-11-23
18+
## date - 2022-12-11
1919
## since - 2022-11-23
2020
## copyright - Copyright (C) 2022 qq542vev. Some rights reserved.
21-
## license - CC-BY <https://creativecommons.org/licenses/by/4.0/>
21+
## license - <CC-BY at https://creativecommons.org/licenses/by/4.0/>
2222
## package - shell-opensearch
2323
##
2424
## See Also:
2525
##
26-
## * Project homepage - <https://github.com/qq542vev/shell-opensearch>
27-
## * Bag report - <https://github.com/qq542vev/shell-opensearch/issues>
26+
## * <Project homepage at https://github.com/qq542vev/shell-opensearch>
27+
## * <Bag report at https://github.com/qq542vev/shell-opensearch/issues>
2828

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

31-
Describe 'opensearch list test'
31+
Describe 'opensearch list の検証'
3232
name_check() {
3333
eval "set -- ${1}"
3434

@@ -57,28 +57,28 @@ Describe 'opensearch list test'
5757

5858
BeforeAll 'setup'
5959

60-
Example 'オプション -h のテスト'
60+
Example 'ヘルプの検証: -h'
6161
When call ./opensearch list -h
6262
The length of stdout should not eq 0
6363
The length of stderr should eq 0
6464
The status should eq 0
6565
End
6666

67-
Example 'オプション --nil のテスト'
67+
Example '無効なオプションの検証: --nil'
6868
When call ./opensearch list --nil
6969
The length of stdout should eq 0
7070
The length of stderr should not eq 0
7171
The status should eq 64
7272
End
7373

74-
Example '2個以上の引数をテスト'
74+
Example '2個以上の引数の検証'
7575
When call ./opensearch list simple detailed
7676
The length of stdout should eq 0
7777
The length of stderr should not eq 0
7878
The status should eq 64
7979
End
8080

81-
Describe 'OpenSearch ファイルを指定'
81+
Describe '各種 OpenSearch ファイルによる検証'
8282
Parameters:block
8383
'simple' "${name}" '' '0'
8484
'detailed' "${name}" '' '0'
@@ -100,15 +100,15 @@ Describe 'opensearch list test'
100100
'./spec/.shell-opensearch/nil.xml' '' '1' '65'
101101
End
102102

103-
Example "オプションなしのテスト: '${1}'"
103+
Example "オプションなしの検証: '${1}'"
104104
When run source ./opensearch -c "${configDir}" list "${1}"
105105
The lines of stdout should eq "$(eval "set -- ${2}"; printf '%d' "${#}")"
106106
The stdout should satisfy name_check "${2}"
107107
The length of stderr should ${3:+'not'} eq 0
108108
The status should eq "${4}"
109109
End
110110

111-
Example "オプション -p のテスト: '${1}'"
111+
Example "--path のテスト: '${1}'"
112112
path_check() {
113113
printf '%s' "${path_check}" | awk -- 'index($0, "/") != 1 && index($0, "./") != 1 { exit 1; }'
114114
}

spec/opensearch-show_spec.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### File: opensearch-show_spec.sh
44
##
5-
## opensearch show のテスト
5+
## opensearch show の検証
66
##
77
## Usage:
88
##
@@ -13,57 +13,57 @@
1313
## Metadata:
1414
##
1515
## id - 798bd004-35d7-42ce-8cde-14a0d04ca04f
16-
## author - qq542vev <https://purl.org/meta/me/>
16+
## author - <qq542vev at https://purl.org/meta/me/>
1717
## version - 1.0.0
1818
## date - 2022-11-26
1919
## since - 2022-11-26
2020
## copyright - Copyright (C) 2022 qq542vev. Some rights reserved.
21-
## license - CC-BY <https://creativecommons.org/licenses/by/4.0/>
21+
## license - <CC-BY at https://creativecommons.org/licenses/by/4.0/>
2222
## package - shell-opensearch
2323
##
2424
## See Also:
2525
##
26-
## * Project homepage - <https://github.com/qq542vev/shell-opensearch>
27-
## * Bag report - <https://github.com/qq542vev/shell-opensearch/issues>
26+
## * <Project homepage at https://github.com/qq542vev/shell-opensearch>
27+
## * <Bag report at https://github.com/qq542vev/shell-opensearch/issues>
2828

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

31-
Describe 'opensearch show test'
31+
Describe 'opensearch show の検証'
3232
setup() {
3333
configDir='./spec/.shell-opensearch'
3434
}
3535

3636
BeforeAll 'setup'
3737

38-
Example 'Option: -h'
38+
Example 'ヘルプの検証: -h'
3939
When call ./opensearch show -h
4040
The length of stdout should not eq 0
4141
The length of stderr should eq 0
4242
The status should eq 0
4343
End
4444

45-
Example 'Option: --nil'
45+
Example '無効なオプションの検証: --nil'
4646
When call ./opensearch show --nil
4747
The length of stdout should eq 0
4848
The length of stderr should not eq 0
4949
The status should eq 64
5050
End
5151

52-
Example '2個以上の引数'
52+
Example '2個以上の引数の検証'
5353
When call ./opensearch show simple detailed
5454
The length of stdout should eq 0
5555
The length of stderr should not eq 0
5656
The status should eq 64
5757
End
5858

59-
Example "オプション -f nil のテスト: '${1}'"
59+
Example '--format nil の検証'
6060
When call ./opensearch -c "${configDir}" show -f nil
6161
The length of stdout should eq 0
6262
The length of stderr should not eq 0
6363
The status should eq 64
6464
End
6565

66-
Describe '基本となるテスト'
66+
Describe '各種 OpenSearch ファイルによる検証'
6767
Parameters:block
6868
'simple' 'simple' '' '0'
6969
'detailed' 'detailed' '' '0'
@@ -81,21 +81,21 @@ Describe 'opensearch show test'
8181
'./spec/.shell-opensearch/nil.xml' '' '1' '65'
8282
End
8383

84-
Example "オプションなしのテスト: '${1}'"
84+
Example "オプションなしの検証: '${1}'"
8585
When call ./opensearch -c "${configDir}" show "${1}"
8686
The stdout should eq "$(cd -- 'spec/show-text'; : | eval "cat -- ${2}")"
8787
The length of stderr should ${3:+'not'} eq 0
8888
The status should eq "${4}"
8989
End
9090

91-
Example "オプション -f xml のテスト: '${1}'"
91+
Example "--format xml の検証: '${1}'"
9292
When call ./opensearch -c "${configDir}" show -f xml "${1}"
9393
The stdout should eq "$(cd -- 'spec/show-xml'; : | eval "cat -- ${2}")"
9494
The length of stderr should ${3:+'not'} eq 0
9595
The status should eq "${4}"
9696
End
9797

98-
Example "オプション -f normalized-xml のテスト: '${1}'"
98+
Example "--format normalized-xml の検証: '${1}'"
9999
When call ./opensearch -c "${configDir}" show -f normalized-xml "${1}"
100100
The stdout should eq "$(cd -- 'spec/show-normalized-xml'; : | eval "cat -- ${2}")"
101101
The length of stderr should ${3:+'not'} eq 0

0 commit comments

Comments
 (0)