Skip to content

Commit

Permalink
test: skip networked tests if no connection (#661)
Browse files Browse the repository at this point in the history
* test: skip networked tests if no connection

* fix: handle unexpected http responses

* fix: return if a valid URL is generated

* test: delete networked test
  • Loading branch information
bashbunni authored Dec 18, 2024
1 parent f255f3a commit 7b3bfac
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions glow_test.go
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
package main

import (
"bytes"
"testing"
)

func TestGlowSources(t *testing.T) {
tt := []string{
".",
"README.md",
"github.com/charmbracelet/glow",
"github://charmbracelet/glow",
"https://github.com/charmbracelet/glow",
}

for _, v := range tt {
t.Run(v, func(t *testing.T) {
buf := &bytes.Buffer{}
err := executeArg(rootCmd, v, buf)
if err != nil {
t.Errorf("Error during execution (args: %s): %v", v, err)
}
if buf.Len() == 0 {
t.Errorf("Output buffer should not be empty (args: %s)", v)
}
})
}
}

func TestGlowFlags(t *testing.T) {
tt := []struct {
args []string
Expand Down

0 comments on commit 7b3bfac

Please sign in to comment.