1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00
lazygit/pkg/commands/os_test.go

17 lines
374 B
Go
Raw Normal View History

package commands
import "testing"
func TestQuote(t *testing.T) {
2018-08-16 13:00:13 +02:00
osCommand := &OSCommand{
Log: nil,
Platform: getPlatform(),
}
test := "hello `test`"
expected := osCommand.Platform.escapedQuote + "hello \\`test\\`" + osCommand.Platform.escapedQuote
test = osCommand.Quote(test)
if test != expected {
t.Error("Expected " + expected + ", got " + test)
}
}