mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-26 09:00:57 +02:00
17 lines
374 B
Go
17 lines
374 B
Go
package commands
|
|
|
|
import "testing"
|
|
|
|
func TestQuote(t *testing.T) {
|
|
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)
|
|
}
|
|
}
|