Skip to content

Commit

Permalink
Merge pull request #524 from rsteube/disable-tests
Browse files Browse the repository at this point in the history
disabled tests
  • Loading branch information
rsteube authored May 6, 2022
2 parents 0fb9600 + 79d3639 commit 1f8d8f8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 38 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ commands:
name: "build"
command: |
go get -t -v ./...
PATH=$PATH:$PWD/bin fish -c "go test -coverprofile=coverage.out -v ./..."
go build
go vet
cd example
go build .
cd ..
PATH=$PATH:$PWD/example go test -coverprofile=coverage.out -v ./...
- run:
name: "shellcheck bash"
command: shellcheck -e SC2046,SC2206,SC2207 <(./example/example _carapace bash)
Expand All @@ -21,7 +22,7 @@ commands:
- run:
name: "PSScriptAnayzer powershell"
command: |
example _carapace powershell > /tmp/powershell.ps1
./example/example _carapace powershell > /tmp/powershell.ps1
pwsh -Command "Invoke-ScriptAnalyzer -Path /tmp/powershell.ps1" -EnableExit
- run:
name: "shellcheck zsh"
Expand Down
5 changes: 3 additions & 2 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package carapace
import (
"os"
"path/filepath"
"strings"
"testing"
)

Expand All @@ -24,9 +25,9 @@ func home(s string) string {

func parent(s string) string {
if s != "" {
return filepath.Dir(wd("")) + "/" + s
return strings.TrimSuffix(filepath.Dir(wd("")), "/") + "/" + s
}
return filepath.Dir(wd("")) + "/"
return strings.TrimSuffix(filepath.Dir(wd("")), "/") + "/"
}

func TestContextAbs(t *testing.T) {
Expand Down
68 changes: 34 additions & 34 deletions example/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func doComplete(t *testing.T, shell string, cmdline string, contained ...string) {
t.Run(cmdline, func(t *testing.T) {
//t.Parallel()
t.Parallel()
var cmd *exec.Cmd

switch shell {
Expand Down Expand Up @@ -119,14 +119,14 @@ var tests = map[string]string{
`example multiparts VALUE=one,DIRECTORY=`: "/",
}

func TestBash(t *testing.T) {
if err := exec.Command("bash", "--version").Run(); err != nil {
t.Skip("skipping bash")
}
for cmdline, text := range tests {
doComplete(t, "bash", cmdline, text)
}
}
//func TestBash(t *testing.T) {
// if err := exec.Command("bash", "--version").Run(); err != nil {
// t.Skip("skipping bash")
// }
// for cmdline, text := range tests {
// doComplete(t, "bash", cmdline, text)
// }
//}

func TestElvish(t *testing.T) {
if err := exec.Command("elvish", "--version").Run(); err != nil {
Expand All @@ -146,23 +146,23 @@ func TestFish(t *testing.T) {
}
}

func TestXonsh(t *testing.T) {
if err := exec.Command("xonsh", "--version").Run(); err != nil {
t.Skip("skipping xonsh")
}
for cmdline, text := range tests {
doComplete(t, "xonsh", cmdline, text)
}
}

func TestOil(t *testing.T) {
if err := exec.Command("oil", "--version").Run(); err != nil {
t.Skip("skipping oil")
}
for cmdline, text := range tests {
doComplete(t, "oil", cmdline, text)
}
}
//func TestXonsh(t *testing.T) {
// if err := exec.Command("xonsh", "--version").Run(); err != nil {
// t.Skip("skipping xonsh")
// }
// for cmdline, text := range tests {
// doComplete(t, "xonsh", cmdline, text)
// }
//}
//
//func TestOil(t *testing.T) {
// if err := exec.Command("oil", "--version").Run(); err != nil {
// t.Skip("skipping oil")
// }
// for cmdline, text := range tests {
// doComplete(t, "oil", cmdline, text)
// }
//}

//func TestPowershell(t *testing.T) {
// if err := exec.Command("pwsh", "--version").Run(); err != nil {
Expand All @@ -173,14 +173,14 @@ func TestOil(t *testing.T) {
// }
//}

func TestZsh(t *testing.T) {
if err := exec.Command("zsh", "--version").Run(); err != nil {
t.Skip("skipping zsh")
}
for cmdline, text := range tests {
doComplete(t, "zsh", cmdline, text)
}
}
//func TestZsh(t *testing.T) {
// if err := exec.Command("zsh", "--version").Run(); err != nil {
// t.Skip("skipping zsh")
// }
// for cmdline, text := range tests {
// doComplete(t, "zsh", cmdline, text)
// }
//}

func TestCarapace(t *testing.T) {
carapace.Test(t)
Expand Down

0 comments on commit 1f8d8f8

Please sign in to comment.