File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ public function inFile(
426426 ?string $ discardFile = null ,
427427 ?string $ discardMax = null
428428 ): static {
429- if (! File::exists ($ path ) && $ path !== '* ' ) {
429+ if (! File::exists ($ path ) && ! Str:: contains ( $ path, [ '* ' , ' ? ' ]) ) {
430430 throw new InvalidArgumentException ("File [ {$ path }] does not exist. " );
431431 }
432432
Original file line number Diff line number Diff line change 3737
3838 expect ($ inputFile ->__toString ())->toBe ("INFILE 'path/to/file' \"OS_FILE_PROC \" BADFILE 'path/to/badfile' DISCARDFILE 'path/to/discardfile' DISCARDMAX 1 " );
3939});
40+
41+ test ('it accepts wildcard in file path ' , function () {
42+ $ inputFile = new InputFile ('path/to/chunk-*.dat ' );
43+
44+ expect ($ inputFile ->__toString ())->toBe ("INFILE 'path/to/chunk-*.dat' " );
45+
46+ $ inputFile = new InputFile ('path/to/chunk-?.dat ' );
47+
48+ expect ($ inputFile ->__toString ())->toBe ("INFILE 'path/to/chunk-?.dat' " );
49+ });
You can’t perform that action at this time.
0 commit comments