1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-27 00:51:18 +02:00

Merge pull request #250 from dawidd6/fix/tests

Fix testing with localized rmdir + don't test scripts directory
This commit is contained in:
Jesse Duffield
2018-09-03 22:04:16 +10:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ func TestOSCommandRunCommandWithOutput(t *testing.T) {
{ {
"rmdir unexisting-folder", "rmdir unexisting-folder",
func(output string, err error) { func(output string, err error) {
assert.Regexp(t, ".*No such file or directory.*", err.Error()) assert.Regexp(t, "rmdir: .* 'unexisting-folder': .*", err.Error())
}, },
}, },
} }
@ -66,7 +66,7 @@ func TestOSCommandRunCommand(t *testing.T) {
{ {
"rmdir unexisting-folder", "rmdir unexisting-folder",
func(err error) { func(err error) {
assert.Regexp(t, ".*No such file or directory.*", err.Error()) assert.Regexp(t, "rmdir: .* 'unexisting-folder': .*", err.Error())
}, },
}, },
} }

View File

@ -3,7 +3,7 @@
set -e set -e
echo "" > coverage.txt echo "" > coverage.txt
for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" -type d); do for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" ! -path "./scripts*" -type d); do
if ls $d/*.go &> /dev/null; then if ls $d/*.go &> /dev/null; then
go test -v -race -coverprofile=profile.out -covermode=atomic $d go test -v -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then if [ -f profile.out ]; then