File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 76
76
# Ensure that the sql files passed are valid file paths.
77
77
if $sql {
78
78
$sql .each | $sqlfile | {
79
- if $sqlfile !~ /^\/(?:[ A-Za-z0-9_-]+\/?+)+(?:\.[A-Za-z0-9]+)+$/ {
79
+ if $sqlfile !~ /^\/(?:.[. A-Za-z0-9_-]+\/?+)+(?:\.[. A-Za-z0-9]+)+$/ {
80
80
$message = " The file '${sqlfile} ' is invalid. A valid file path is expected."
81
81
fail($message )
82
82
}
Original file line number Diff line number Diff line change 104
104
'/tmp/.test' ,
105
105
'/foo.test' ,
106
106
'/foo.test.txt' ,
107
+ '/foo/test/test-1.2.3/schema/test.sql' ,
108
+ '/foo/test/test-1.2.3/schema/foo.test.sql' ,
109
+ '/foo/foo.t1.t2.t3/foo.test-1.2.3/test.test.schema/test..app.sql' ,
110
+ '/foo/foo.t1.t2...t3/foo.test-1.2.3/test.test.schema/test.app.sql' ,
107
111
] . each do |path |
108
112
it "succeeds when provided '#{ path } ' as a value to the 'sql' parameter" do
109
113
params [ 'sql' ] = [ path ]
You can’t perform that action at this time.
0 commit comments