Skip to content
Newer
Older
100644 45 lines (29 sloc) 896 Bytes
58135b3 [t/spec] changed 'use v6-alpha;' to 'use v6;'
moritz authored May 8, 2008
1 use v6;
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
2 use Test;
05b085d [S16-filehandles/open.t] removed stale tests
masak authored Jul 4, 2010
3 plan 3;
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
4
98791c8 update some of the smartlinks
szabgab authored Apr 28, 2009
5 # L<S32::IO/IO::File/open>
6 # old: L<S16/"Filehandles, files, and directories"/"open">
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
7
8 =begin pod
9
10 Some edge and error cases for open()
11
12 =end pod
13
14
15 if $*OS eq "browser" {
16 skip_rest "Programs running in browsers don't have access to regular IO.";
17 exit;
18 }
19
20 # deal with non-existent files
21 {
8b5a87e @moritz reverse order of skip() arguments all over the test suite
moritz authored Feb 28, 2011
22 skip("open('nonexisting') => undefined is waiting on 'use fatal'", 1);
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
23
24 if 0 {
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored Nov 25, 2009
25 ok(!defined(open("file_which_does_not_exist")), 'open() on non-existent file returns undefined');
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
26 }
27
28 open("create_this_file", :w);
20f1e14 [t/spec] switch to .IO form of file tests
moritz authored Jul 18, 2010
29 ok('create_this_file'.IO ~~ :e, 'writing to a non-existent file creates it');
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
30 unlink('create_this_file');
31
32 open("create_this_file2", :w);
20f1e14 [t/spec] switch to .IO form of file tests
moritz authored Jul 18, 2010
33 ok('create_this_file2'.IO ~~ :e, 'appending to a non-existent file creates it');
c72f604 [t] Test suite refactoring.
cosimo authored Jan 30, 2008
34 unlink('create_this_file2');
35 }
36
37
38 =begin pod
39
40 I/O Redirection to scalar tests
41
42 =end pod
43
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored Aug 8, 2009
44 # vim: ft=perl6
Something went wrong with that request. Please try again.