mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 03:03:32 +01:00
fix: cross-platform CI test fixes and parse bug fix
- Add .gitattributes to force LF in mock files (Windows autocrlf) - Fix parse.go: detect line endings from content instead of runtime.GOOS - Add fail-fast: false to CI matrix; trigger on all branch pushes - Skip chmod-based tests on Windows (permissions work differently) - Use filepath.Join for expected paths in Windows path tests - Use platform-appropriate invalid paths in error tests - Add Windows absolute path test case for ValidateSheetName - Skip Unix-specific integration tests on Windows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
@@ -78,6 +79,9 @@ func TestConfigFailure(t *testing.T) {
|
||||
// TestEmptyEditor asserts that envvars are respected if an editor is not
|
||||
// specified in the configs
|
||||
func TestEmptyEditor(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("Editor() returns notepad on Windows before checking env vars")
|
||||
}
|
||||
|
||||
// clear the environment variables
|
||||
os.Setenv("VISUAL", "")
|
||||
|
||||
Reference in New Issue
Block a user