add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

25
pages.zh/common/test.md Normal file
View File

@@ -0,0 +1,25 @@
# 测试
> 检查文件类型并比较值。
> 如果条件评估为真则返回0如果评估为假则返回1。
> 更多信息:<https://www.gnu.org/software/coreutils/test>。
- 测试给定变量是否等于给定字符串:
`test "{{$MY_VAR}}" = "{{/bin/zsh}}"`
- 测试给定变量是否为空:
`test -z "{{$GIT_BRANCH}}"`
- 测试文件是否存在:
`test -f "{{path/to/file_or_directory}}"`
- 测试目录是否不存在:
`test ! -d "{{path/to/directory}}"`
- 如果A为真则执行B或在错误情况下执行C注意即使A失败C也可能会执行
`test {{condition}} && {{echo "true"}} || {{echo "false"}}`