Skip to content

Commit

Permalink
モールス信号のテストが動作するかのチェック
Browse files Browse the repository at this point in the history
  • Loading branch information
wada-jun8 committed Nov 27, 2024
1 parent 0efbba8 commit 4681afc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: All test
run: bash -xv ./test.bash
run: |
bash -xv ./test.bash
bash -xv ./morse_test.bash
1 change: 1 addition & 0 deletions morse
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/python3

# SPDX-FileCopyrightText: 2024 Junya Wada
# SPDX-License-Identifier: GPL-3.0-only

Expand Down
18 changes: 18 additions & 0 deletions morse_test.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -xv
# SPDX-FileCopyrightText: 2024 Junya Wada
# SPDX-License-Identifier: GPL-3.0-only

ng(){
echo ${1}行目が違う
res=1
}

res = 0

out=$(echo "a" | ./morse)
[ "${out}" = "・ー" ] || ng "$LINENO"


[ "$res" = 0 ] && echo OK

exit $res

0 comments on commit 4681afc

Please sign in to comment.