summaryrefslogtreecommitdiff
path: root/src/options_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/options_test.go')
-rw-r--r--src/options_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/options_test.go b/src/options_test.go
index 5def73dc..40d2920b 100644
--- a/src/options_test.go
+++ b/src/options_test.go
@@ -9,9 +9,13 @@ import (
)
func TestDelimiterRegex(t *testing.T) {
- // Valid regex
+ // Valid regex, but a single character -> string
delim := delimiterRegexp(".")
- if delim.regex == nil || delim.str != nil {
+ if delim.regex != nil || *delim.str != "." {
+ t.Error(delim)
+ }
+ delim = delimiterRegexp("|")
+ if delim.regex != nil || *delim.str != "|" {
t.Error(delim)
}
// Broken regex -> string