summaryrefslogtreecommitdiff
path: root/internal/regex/regex_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/regex/regex_test.go')
-rw-r--r--internal/regex/regex_test.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/internal/regex/regex_test.go b/internal/regex/regex_test.go
index 2ce49ac..033a286 100644
--- a/internal/regex/regex_test.go
+++ b/internal/regex/regex_test.go
@@ -9,7 +9,8 @@ func TestRegex(t *testing.T) {
r := NewNoop()
if !r.MatchString(input) {
- t.Errorf("expected to match string '%s' with noop regex '%v' but didn't\n", input, r)
+ t.Errorf("expected to match string '%s' with noop regex '%v' but didn't\n",
+ input, r)
}
r, err := New(".hello", Default)
@@ -17,7 +18,8 @@ func TestRegex(t *testing.T) {
t.Errorf("unable to create regex: %v\n", err)
}
if r.MatchString(input) {
- t.Errorf("expected to match string '%s' with regex '%v' but didn't\n", input, r)
+ t.Errorf("expected to match string '%s' with regex '%v' but didn't\n",
+ input, r)
}
serialized, err := r.Serialize()
@@ -29,8 +31,8 @@ func TestRegex(t *testing.T) {
t.Errorf("unable to serialize deserialized regex: %v: %v\n", serialized, err)
}
if r.String() != r2.String() {
- t.Errorf("regex should be the same after deserialize(serialize(..)), got '%s' but expected '%s'.\n",
- r2.String(), r.String())
+ t.Errorf("regex should be the same after deserialize(serialize(..)), got "+
+ "'%s' but expected '%s'.\n", r2.String(), r.String())
}
r, err = New(".hello", Invert)
@@ -38,7 +40,8 @@ func TestRegex(t *testing.T) {
t.Errorf("unable to create regex: %v\n", err)
}
if !r.MatchString(input) {
- t.Errorf("expected to not match string '%s' with regex '%v' but matched\n", input, r)
+ t.Errorf("expected to not match string '%s' with regex '%v' but matched\n",
+ input, r)
}
serialized, err = r.Serialize()
@@ -50,7 +53,7 @@ func TestRegex(t *testing.T) {
t.Errorf("unable to serialize deserialized regex: %v: %v\n", serialized, err)
}
if r.String() != r2.String() {
- t.Errorf("regex should be the same after deserialize(serialize(..)), got '%s' but expected '%s'.\n",
- r2.String(), r.String())
+ t.Errorf("regex should be the same after deserialize(serialize(..)), got "+
+ "'%s' but expected '%s'.\n", r2.String(), r.String())
}
}