Comments (5)
in my case the open was coming from code outside my responsibility so without patching it...
I would not be able to use T::MF in such cases...
from test-mockfile.
We should do a pass-through for pipe open
s.
from test-mockfile.
What should this do?
my $cmd = Test::MockFile->file( '/bin/foo', $script_code );
chmod 755, $cmd->path();
open my $scriptfh, '|-', 'foo' or die $!; # or /bin/foo
my $output = <$scriptfh>;
If we pass through all pipe commands, then this will not work. Do we want it to work? If we want it to work, we'll need to manage the PATH resolution, which I'm not a fan of...
from test-mockfile.
For now I will handle the easy cases and leave the pipe
as unsupported.
open( my $fh, '>/there'); # and other flavors
from test-mockfile.
By "unsupported" here, we mean pass through, right? There's "unsupported" as failing.
from test-mockfile.
Related Issues (20)
- Only show files within the directory HOT 2
- Setting time for a file does not change the time for a directory
- Clean up the tests to remove localized error strings ($!) HOT 1
- Failing tests HOT 1
- Document how to allow loading the debugger
- t/readline.t fails on freebsd
- t/runtime-bareword-filehandles.t fails (sometimes) on 5.16.3
- Provide a way to mock a whole dir or tree.
- Test::MockFile symlinks does not play nice with Cwd... HOT 1
- Test::MockFile corrupts glob
- chmod() should ignore filehandle arguments HOT 2
- utime() isnβt covered in strict mode
- File::Temp::tempfile() in scalar context should create an unlinked file.
- Failed test '$! is EINVAL for a readlink(undef)'
- binmode is unimplemented - cannot use File::Copy with Test::MockFile HOT 2
- Home directory isn't properly supported
- Spooky action-at-a-distance
- add_strict_rule_for_command: support for scalar usage in addition to RegEx
- When a mocked directories contents change the mocked parent directly mtime should also be updated. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-mockfile.