File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 7676 # Ensure that the sql files passed are valid file paths.
7777 if $sql {
7878 $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]+)+$/ {
8080 $message = " The file '${sqlfile} ' is invalid. A valid file path is expected."
8181 fail($message )
8282 }
Original file line number Diff line number Diff line change 104104 '/tmp/.test' ,
105105 '/foo.test' ,
106106 '/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' ,
107111 ] . each do |path |
108112 it "succeeds when provided '#{ path } ' as a value to the 'sql' parameter" do
109113 params [ 'sql' ] = [ path ]
You can’t perform that action at this time.
0 commit comments