Skip to content

Commit

Permalink
Not test example code on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nao1215 committed Oct 21, 2023
1 parent f01f1b4 commit acb7da5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions examples_test.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
//go:build windows
// +build windows

package markdown_test

import (
"os"
"runtime"

"github.com/go-spectest/markdown"
)

// Examle is example code. Skip this test on Windows.
// The newline codes in the comment section where
// the expected values are written are represented as '\n',
// causing failures when testing on Windows.
func Example() {
// Skip this test on Windows.
// The newline codes in the comment section where
// the expected values are written are represented as '\n',
// causing failures when testing on Windows.
if runtime.GOOS == "windows" {
return
}

markdown.NewMarkdown(os.Stdout).
H1("This is H1").
PlainText("This is plain text").
Expand Down

0 comments on commit acb7da5

Please sign in to comment.