-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dearchive に実行権限付与およびテストケース追加 #50
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# dearchive用テストのサンプルデータのセットです |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
1 | ||
2 | ||
Fizz | ||
4 | ||
Buzz | ||
Fizz | ||
7 | ||
8 | ||
Fizz | ||
Buzz | ||
11 | ||
Fizz | ||
13 | ||
14 | ||
FizzBuzz | ||
16 | ||
17 | ||
Fizz | ||
19 | ||
Buzz | ||
Fizz | ||
22 | ||
23 | ||
Fizz | ||
Buzz | ||
26 | ||
Fizz | ||
28 | ||
29 | ||
FizzBuzz | ||
31 | ||
32 | ||
Fizz | ||
34 | ||
Buzz | ||
Fizz | ||
37 | ||
38 | ||
Fizz | ||
Buzz | ||
41 | ||
Fizz | ||
43 | ||
44 | ||
FizzBuzz | ||
46 | ||
47 | ||
Fizz | ||
49 | ||
Buzz | ||
Fizz | ||
52 | ||
53 | ||
Fizz | ||
Buzz | ||
56 | ||
Fizz | ||
58 | ||
59 | ||
FizzBuzz | ||
61 | ||
62 | ||
Fizz | ||
64 | ||
Buzz | ||
Fizz | ||
67 | ||
68 | ||
Fizz | ||
Buzz | ||
71 | ||
Fizz | ||
73 | ||
74 | ||
FizzBuzz | ||
76 | ||
77 | ||
Fizz | ||
79 | ||
Buzz | ||
Fizz | ||
82 | ||
83 | ||
Fizz | ||
Buzz | ||
86 | ||
Fizz | ||
88 | ||
89 | ||
FizzBuzz | ||
91 | ||
92 | ||
Fizz | ||
94 | ||
Buzz | ||
Fizz | ||
97 | ||
98 | ||
Fizz | ||
Buzz |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
03ce0331cbd983f1689e1eea65561cac |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#shellcheck shell=sh | ||
|
||
file_compare() { | ||
cmp -s \ | ||
"${PATH_DIR_WORK}/sample002.txt" \ | ||
"${PATH_DIR_TEST}/data/sample002/sample002.txt" \ | ||
&& echo "successful" || echo "failure" | ||
} | ||
|
||
cleanup() { | ||
rm -f "${PATH_DIR_WORK}/sample002.txt" | ||
} | ||
|
||
Describe 'dearchive with raw password' | ||
After "cleanup" | ||
|
||
It 'should dearchive file with status 0' | ||
When call "${PATH_DIR_BIN}/dearchive" \ | ||
"${PATH_DIR_TEST}/data/sample002/sample002.txt.tar.gz.aes" \ | ||
"${PATH_DIR_WORK}" \ | ||
"${PATH_DIR_TEST}/data/sample002/sample002.txt.tar.gz.aes.passwd" | ||
|
||
The output should include "共通鍵でファイルを復号しています ... OK" | ||
The error should include "deprecated key derivation used." # TODO | ||
The status should be success | ||
End | ||
End | ||
|
||
Describe 'dearchive with encrypted password' | ||
After "cleanup" | ||
|
||
It 'should dearchive file with status 0' | ||
When call "${PATH_DIR_BIN}/dearchive" \ | ||
"${PATH_DIR_TEST}/data/sample002/sample002.txt.tar.gz.aes" \ | ||
"${PATH_DIR_WORK}" \ | ||
"${PATH_DIR_TEST}/data/sample002/sample002.txt.tar.gz.aes.passwd.enc" \ | ||
"${PATH_DIR_TEST}/.ssh/openssh/no_pass/id_rsa.pem" | ||
|
||
The output should include "ファイルを復号しました。" | ||
The output should include "共通鍵でファイルを復号しています ... OK" | ||
The error should include "deprecated key derivation used." # TODO | ||
The status should be success | ||
End | ||
End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#shellcheck shell=sh | ||
|
||
Describe 'dearchive with no arg' | ||
It 'should print help with status 1' | ||
When call "${PATH_DIR_BIN}/dearchive" | ||
|
||
The output should include "使い方" | ||
The status should be failure # status is 1-255 | ||
End | ||
End |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あとで追跡できるように、備忘録 Ping #51