Skip to content

Commit 7b3bfac

Browse files
authored
test: skip networked tests if no connection (#661)
* test: skip networked tests if no connection * fix: handle unexpected http responses * fix: return if a valid URL is generated * test: delete networked test
1 parent f255f3a commit 7b3bfac

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

glow_test.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,9 @@
11
package main
22

33
import (
4-
"bytes"
54
"testing"
65
)
76

8-
func TestGlowSources(t *testing.T) {
9-
tt := []string{
10-
".",
11-
"README.md",
12-
"github.com/charmbracelet/glow",
13-
"github://charmbracelet/glow",
14-
"https://github.com/charmbracelet/glow",
15-
}
16-
17-
for _, v := range tt {
18-
t.Run(v, func(t *testing.T) {
19-
buf := &bytes.Buffer{}
20-
err := executeArg(rootCmd, v, buf)
21-
if err != nil {
22-
t.Errorf("Error during execution (args: %s): %v", v, err)
23-
}
24-
if buf.Len() == 0 {
25-
t.Errorf("Output buffer should not be empty (args: %s)", v)
26-
}
27-
})
28-
}
29-
}
30-
317
func TestGlowFlags(t *testing.T) {
328
tt := []struct {
339
args []string

0 commit comments

Comments
 (0)