加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tests.sh 777 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
check=0
function test_space_indented {
local spaced
spaced=$(grep -REn '^ ' --include '*.snippets' snippets)
if [[ $? -ne 1 ]]; then
echo "These snippet lines are indented with spaces:"
echo "$spaced"
echo
(( check++ ))
fi
}
function test_snipmate_format {
local ultisnips_in_snipmate
ultisnips_in_snipmate=$(grep -REn 'endsnippet' --include '*.snippets' snippets)
if [[ $? -ne 1 ]]; then
echo "These snippet definitions are probably in UltiSnips format but stored in the snipmate directory"
echo "$ultisnips_in_snipmate"
echo
(( check++ ))
fi
}
test_space_indented
test_snipmate_format
if [ $check -eq 0 ]; then
echo "Tests passed!"
exit 0
else
echo "$check test(s) failed out of 2!"
exit 1
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化