Skip to content

Commit

Permalink
Merge pull request #110 from HansBug/dev/binary
Browse files Browse the repository at this point in the history
dev(hansbug): add more unittest for binary
  • Loading branch information
HansBug authored Oct 15, 2024
2 parents 927b075 + ed69fc2 commit f0b9c37
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
dist/git_raw --version
! dist/git_raw lfs version
- name: Upload dist directory
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: git-exec-${{ env.OS_NAME }}
path: dist
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
run: |
brew install tree cloc wget curl make zip
- name: Download dist directory
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: git-exec-${{ env.OS_NAME }}
path: dist
Expand Down
10 changes: 10 additions & 0 deletions test/system/filesystem/test_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ class TestSystemFilesystemBinary:
('igm/xztar_template-simple.tar.xz', True),
('igm/LICENSE', False),
('igm/README.md', False),
('chinese.txt', False),
('english.txt', False),
('japanese.txt', False),
('korean.txt', False),
('russian.txt', False),
('empty', False),
]
)
Expand All @@ -28,6 +33,11 @@ def test_is_binary_file(self, file, is_binary):
('igm/xztar_template-simple.tar.xz', False),
('igm/LICENSE', True),
('igm/README.md', True),
('chinese.txt', True),
('english.txt', True),
('japanese.txt', True),
('korean.txt', True),
('russian.txt', True),
('empty', True),
]
)
Expand Down
5 changes: 5 additions & 0 deletions test/testfile/chinese.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
春天来了,
百花齐放,
蝴蝶翩翩起舞。
小河流水潺潺,
鸟儿歌唱动听。
5 changes: 5 additions & 0 deletions test/testfile/english.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The sun rises,
Casting golden rays.
Birds chirp merrily,
As the world awakens.
A new day begins.
5 changes: 5 additions & 0 deletions test/testfile/japanese.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
桜の花が咲く、
春の風が吹く。
川の水が流れる、
鳥たちが歌う。
新しい季節の始まり。
5 changes: 5 additions & 0 deletions test/testfile/korean.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
봄이 왔습니다,
꽃들이 피어납니다.
나비가 날아다닙니다,
시냇물이 흐릅니다.
새들이 노래합니다.
5 changes: 5 additions & 0 deletions test/testfile/russian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Весна пришла,
Цветы расцвели.
Бабочки порхают,
Ручьи журчат.
Птицы поют.

0 comments on commit f0b9c37

Please sign in to comment.