Skip to content

Commit 48326a4

Browse files
committed
Add test for the interval regex itself
1 parent 1154728 commit 48326a4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/runtests.jl

+18
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,24 @@ end
10801080

10811081
close(conn)
10821082
end
1083+
1084+
@testset "Interval Regex" begin
1085+
regex = LibPQ.INTERVAL_REGEX[]
1086+
inputs = [
1087+
"P1Y2M3DT4H5M6S",
1088+
"PT6.1S",
1089+
"PT6.01S",
1090+
"PT6.001S",
1091+
"PT6.0001S",
1092+
"PT6.1001S",
1093+
"P100Y49D",
1094+
"P1DT-1H",
1095+
"P-1M1D",
1096+
]
1097+
for input in inputs
1098+
@test match(regex, input) !== nothing
1099+
end
1100+
end
10831101
end
10841102
end
10851103

0 commit comments

Comments
 (0)