in reply to Can a POST command (with a file attachment) be simulated via the terminal?
To avoid XY-problem (my fingers tried to type XS there, which is a bit Freudian), I think you'll do best of all by having the file-handling in its own function, and automated tests to call that file-handling with various inputs and checking the results.
|
|---|