-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding notifications support for windows
Invoking PowerShell is slow (around 5 second delay) but I can't find a better way. Contributions welcome\!
- Loading branch information
1 parent
36bb808
commit 2e7ee28
Showing
2 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package app | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestEscapeNotifyString(t *testing.T) { | ||
assert.Equal(t, "normal", escapeNotifyString("normal")) | ||
assert.Equal(t, "isn't", escapeNotifyString("isn't")) | ||
assert.Equal(t, "`\"mine`\"", escapeNotifyString(`"mine"`)) | ||
assert.Equal(t, "sla\\sh", escapeNotifyString(`sla\sh`)) | ||
assert.Equal(t, "qu``ote", escapeNotifyString("qu`ote")) | ||
assert.Equal(t, "escaped ```\" string", escapeNotifyString("escaped `\" string")) | ||
} |