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(
426
426
?string $ discardFile = null ,
427
427
?string $ discardMax = null
428
428
): static {
429
- if (! File::exists ($ path ) && $ path !== '* ' ) {
429
+ if (! File::exists ($ path ) && ! Str:: contains ( $ path, [ '* ' , ' ? ' ]) ) {
430
430
throw new InvalidArgumentException ("File [ {$ path }] does not exist. " );
431
431
}
432
432
Original file line number Diff line number Diff line change 37
37
38
38
expect ($ inputFile ->__toString ())->toBe ("INFILE 'path/to/file' \"OS_FILE_PROC \" BADFILE 'path/to/badfile' DISCARDFILE 'path/to/discardfile' DISCARDMAX 1 " );
39
39
});
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