Skip to content

Commit

Permalink
Merge pull request #2866 from jruby/truffle-io
Browse files Browse the repository at this point in the history
[Truffle] New IO implementation
  • Loading branch information
chrisseaton committed Apr 23, 2015
2 parents a75874b + cb890b1 commit 9fad714
Show file tree
Hide file tree
Showing 132 changed files with 4,734 additions and 1,884 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/atime_tags.txt
@@ -1,4 +1,3 @@
fails:File.atime returns the last access time for the named file as a Time object
fails:File.atime raises an Errno::ENOENT exception if the file is not found
fails:File.atime accepts an object that has a #to_path method
fails:File#atime returns the last access time to self
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/blockdev_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/chardev_tags.txt

This file was deleted.

5 changes: 0 additions & 5 deletions spec/truffle/tags/core/file/constants_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/ctime_tags.txt
@@ -1,4 +1,3 @@
fails:File.ctime Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself).
fails:File.ctime accepts an object that has a #to_path method
fails:File.ctime raises an Errno::ENOENT exception if the file is not found
fails:File#ctime Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself).
7 changes: 0 additions & 7 deletions spec/truffle/tags/core/file/extname_tags.txt

This file was deleted.

21 changes: 0 additions & 21 deletions spec/truffle/tags/core/file/fnmatch_tags.txt
@@ -1,23 +1,2 @@
fails:File.fnmatch? matches entire strings
fails:File.fnmatch? does not match partial strings
fails:File.fnmatch? does not support { } patterns by default
fails:File.fnmatch? supports some { } patterns when File::FNM_EXTGLOB is passed
fails:File.fnmatch? matches a single character for each ? character
fails:File.fnmatch? matches zero or more characters for each * character
fails:File.fnmatch? matches ranges of characters using bracket expresions (e.g. [a-z])
fails:File.fnmatch? matches ranges of characters using bracket expresions, taking case into account
fails:File.fnmatch? does not match characters outside of the range of the bracket expresion
fails:File.fnmatch? matches ranges of characters using exclusive bracket expresions (e.g. [^t] or [!t])
fails:File.fnmatch? matches characters with a case sensitive comparison
fails:File.fnmatch? matches literal ? or * in path when pattern includes \? or \*
fails:File.fnmatch? matches literal character (e.g. 'a') in path when pattern includes escaped character (e.g. \a)
fails:File.fnmatch? escapes special characters inside bracket expression
fails:File.fnmatch? does not match leading periods in filenames with wildcards by default
fails:File.fnmatch? matches patterns with leading periods to dotfiles by default
fails:File.fnmatch? matches multiple directories with ** and *
fails:File.fnmatch? matches multiple directories with ** when flags includes File::FNM_PATHNAME
fails:File.fnmatch? accepts an object that has a #to_path method
fails:File.fnmatch? raises a TypeError if the first and second arguments are not string-like
fails:File.fnmatch? does not raise a TypeError if the third argument can be coerced to an Integer
fails(windows):File.fnmatch matches case sensitive characters on platfroms with case insensitive paths, when flags include FNM_SYSCASE
fails(windows):File.fnmatch? matches case sensitive characters on platfroms with case insensitive paths, when flags include FNM_SYSCASE
8 changes: 0 additions & 8 deletions spec/truffle/tags/core/file/ftype_tags.txt
@@ -1,10 +1,2 @@
fails:File.ftype raises ArgumentError if not given exactly one filename
fails:File.ftype raises Errno::ENOENT if the file is not valid
fails:File.ftype returns a String
fails:File.ftype returns 'file' when the file is a file
fails:File.ftype returns 'directory' when the file is a dir
fails:File.ftype returns 'blockSpecial' when the file is a block
fails:File.ftype returns 'characterSpecial' when the file is a char
fails:File.ftype returns 'link' when the file is a link
fails:File.ftype returns fifo when the file is a fifo
fails:File.ftype returns 'socket' when the file is a socket
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/file/grpowned_tags.txt
@@ -1,5 +1,2 @@
fails:File.grpowned? returns true if the file exist
fails:File.grpowned? accepts an object that has a #to_path method
fails:File.grpowned? takes non primary groups into account
fails:File.grpowned? returns false if file the does not exist
fails(windows):File.grpowned? returns false if the file exist
1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/inspect_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/link_tags.txt
@@ -1,4 +1,2 @@
fails:File.link link a file with another
fails:File.link raises an Errno::EEXIST if the target already exists
fails:File.link raises an ArgumentError if not passed two arguments
fails:File.link raises a TypeError if not passed String types
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/lstat_tags.txt
@@ -1,5 +1,3 @@
fails:File.lstat returns a File::Stat object if the given file exists
fails:File.lstat returns a File::Stat object when called on an instance of File
fails:File.lstat accepts an object that has a #to_path method
fails:File.lstat raises an Errno::ENOENT if the file does not exist
fails:File.lstat returns a File::Stat object with symlink properties for a symlink
1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/mtime_tags.txt
@@ -1,3 +1,2 @@
fails:File.mtime returns the modification Time of the file
fails:File.mtime raises an Errno::ENOENT exception if the file is not found
fails:File#mtime returns the modification Time of the file
16 changes: 0 additions & 16 deletions spec/truffle/tags/core/file/new_tags.txt
@@ -1,20 +1,4 @@
fails:File.new returns a new File with mode string
fails:File.new returns a new File with mode num
fails:File.new returns a new File with modus num and permissions
fails:File.new creates the file and returns writable descriptor when called with 'w' mode and r-o permissions
fails:File.new opens the existing file, does not change permissions even when they are specified
fails:File.new returns a new File with modus fd
fails:File.new creates a new file when use File::EXCL mode
fails:File.new raises an Errorno::EEXIST if the file exists when create a new file with File::CREAT|File::EXCL
fails:File.new creates a new file when use File::WRONLY|File::APPEND mode
fails:File.new returns a new File when use File::APPEND mode
fails:File.new returns a new File when use File::RDONLY|File::APPEND mode
fails:File.new returns a new File when use File::RDONLY|File::WRONLY mode
fails:File.new creates a new file when use File::WRONLY|File::TRUNC mode
fails:File.new coerces filename using to_str
fails:File.new coerces filename using #to_path
fails:File.new raises a TypeError if the first parameter can't be coerced to a string
fails:File.new raises a TypeError if the first parameter is nil
fails:File.new raises an Errno::EBADF if the first parameter is an invalid file descriptor
fails:File.new can't alter mode or permissions when opening a file
fails:File.new opens directories
1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/null_tags.txt
@@ -1,2 +1 @@
fails:File::NULL returns /dev/null as a string
fails(windows):File::NULL returns NUL as a string
53 changes: 0 additions & 53 deletions spec/truffle/tags/core/file/open_tags.txt
@@ -1,69 +1,16 @@
fails:File.open opens the file (basic case)
fails:File.open opens with mode string
fails:File.open opens a file with mode num
fails:File.open opens a file with mode and permission as nil
fails:File.open opens the file when passed mode, num and permissions
fails:File.open opens the file when passed mode, num, permissions and block
fails:File.open creates the file and returns writable descriptor when called with 'w' mode and r-o permissions
fails:File.open opens the existing file, does not change permissions even when they are specified
fails:File.open creates a new write-only file when invoked with 'w' and '0222'
fails:File.open opens a file that no exists when use File::WRONLY mode
fails:File.open opens a file that no exists when use File::RDONLY mode
fails:File.open opens a file that no exists when use 'r' mode
fails:File.open opens a file that no exists when use File::EXCL mode
fails:File.open opens a file that no exists when use File::NONBLOCK mode
fails:File.open opens a file that no exists when use File::TRUNC mode
fails:File.open opens a file that no exists when use File::NOCTTY mode
fails:File.open opens a file that no exists when use File::CREAT mode
fails:File.open opens a file that no exists when use 'a' mode
fails:File.open opens a file that no exists when use 'w' mode
fails:File.open raises an ArgumentError exception when call with an unknown mode
fails:File.open can read in a block when call open with RDONLY mode
fails:File.open can read in a block when call open with 'r' mode
fails:File.open raises an IO exception when write in a block opened with RDONLY mode
fails:File.open raises an IO exception when write in a block opened with 'r' mode
fails:File.open can't write in a block when call open with File::WRONLY||File::RDONLY mode
fails:File.open can't read in a block when call open with File::WRONLY||File::RDONLY mode
fails:File.open can write in a block when call open with WRONLY mode
fails:File.open raises an IOError when read in a block opened with WRONLY mode
fails:File.open raises an IOError when read in a block opened with 'w' mode
fails:File.open raises an IOError when read in a block opened with 'a' mode
fails:File.open raises an IOError when read in a block opened with File::WRONLY|File::APPEND mode
fails:File.open raises an IOError when read in a block opened with File::RDONLY|File::APPEND mode
fails:File.open can read and write in a block when call open with RDWR mode
fails:File.open can't read in a block when call open with File::EXCL mode
fails:File.open can read in a block when call open with File::EXCL mode
fails:File.open can read and write in a block when call open with File::RDWR|File::EXCL mode
fails:File.open raises an Errorno::EEXIST if the file exists when open with File::CREAT|File::EXCL
fails:File.open creates a new file when use File::WRONLY|File::APPEND mode
fails:File.open opens a file when use File::WRONLY|File::APPEND mode
fails:File.open raises an IOError if the file exists when open with File::RDONLY|File::APPEND
fails:File.open truncates the file when passed File::TRUNC mode
fails:File.open can't read in a block when call open with File::TRUNC mode
fails:File.open opens a file when use File::WRONLY|File::TRUNC mode
fails:File.open can't write in a block when call open with File::TRUNC mode
fails:File.open raises an Errorno::EEXIST if the file exists when open with File::RDONLY|File::TRUNC
fails:File.open raises an Errno::EACCES when opening non-permitted file
fails:File.open raises an Errno::EACCES when opening read-only file
fails:File.open opens a file for binary read
fails:File.open opens a file for binary write
fails:File.open opens a file for read-write and truncate the file
fails:File.open opens a file for binary read-write starting at the beginning of the file
fails:File.open opens a file for binary read-write and truncate the file
fails:File.open raises a SystemCallError if passed an invalid Integer type
fails:File.open raises an ArgumentError if passed an invalid string for mode
fails:File.open defaults external_encoding to ASCII-8BIT for binary modes
fails:File.open uses the second argument as an options Hash
fails:File.open calls #to_hash to convert the second argument to a Hash
fails:File.open with a block does not raise error when file is closed inside the block
fails:File.open with a block invokes close on an opened file when exiting the block
fails:File.open with a block propagates non-StandardErrors produced by close
fails:File.open with a block does not propagate StandardErrors produced by close
fails:File.open on a FIFO opens it as a normal file
fails:File.open when passed a file descriptor opens a file
fails:File.open when passed a file descriptor opens a file when passed a block
fails:File.open opens directories
fails:File.open opens the file when call with fd
fails:File.open opens a file with a file descriptor d and a block
fails:File.open with a block propagates StandardErrors produced by close
fails:File.open with a block does not propagate IOError with 'closed stream' message produced by close
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/file/owned_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/path_tags.txt
@@ -1,2 +1 @@
fails:File#path returns the pathname used to create file as a string
windows:File.path returns the full path for the given file
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/pipe_tags.txt
@@ -1,3 +1 @@
fails:File.pipe? returns false if file does not exist
fails:File.pipe? returns false if the file is not a pipe
fails:File.pipe? returns true if the file is a pipe
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/file/readable_real_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/file/readable_tags.txt
@@ -1,3 +1,2 @@
fails:File.readable? accepts an object that has a #to_path method
windows:File.readable? returns true if named file is readable by the effective user id of the process, otherwise false
windows:File.readable? returns false if the file does not exist
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/rename_tags.txt
@@ -1,4 +1,2 @@
fails:File.rename renames a file
fails:File.rename raises an Errno::ENOENT if the source does not exist
fails:File.rename raises an ArgumentError if not passed two arguments
fails:File.rename raises a TypeError if not passed String types
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/setgid_tags.txt
@@ -1,3 +1 @@
fails:File.setgid? returns false if the file was just made
fails:File.setgid? returns false if the file does not exist
fails:File.setgid? returns true when the gid bit is set
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/setuid_tags.txt
@@ -1,3 +1 @@
fails:File.setuid? returns false if the file was just made
fails:File.setuid? returns false if the file does not exist
fails:File.setuid? returns true when the gid bit is set
8 changes: 0 additions & 8 deletions spec/truffle/tags/core/file/size_tags.txt
@@ -1,15 +1,7 @@
fails:File.size? accepts a String-like (to_str) parameter
fails:File.size? accepts an object that has a #to_path method
fails:File.size? calls #to_io to convert the argument to an IO
fails:File.size? accepts a File argument
fails:File.size returns the size of the file if it exists and is not empty
fails:File.size accepts a String-like (to_str) parameter
fails:File.size accepts an object that has a #to_path method
fails:File.size calls #to_io to convert the argument to an IO
fails:File.size raises an error if file_name doesn't exist
fails:File.size returns 0 if the file is empty
fails:File.size accepts a File argument
fails:File#size is an instance method
fails:File#size returns the file's size as a Fixnum
fails:File#size returns the file's size in bytes
fails:File#size returns the cached size of the file if subsequently deleted
Expand Down
8 changes: 0 additions & 8 deletions spec/truffle/tags/core/file/split_tags.txt
@@ -1,10 +1,2 @@
fails:File.split splits the string at the last '/' when the last component does not have an extension
fails:File.split splits the string at the last '/' when the last component has an extension
fails:File.split splits an empty string into a '.' and an empty string
fails:File.split collapses multiple '/' characters and strips trailing ones
fails:File.split splits the string at the last '\' when the last component does not have an extension
fails:File.split splits the string at the last '\' when the last component has an extension
fails:File.split raises an ArgumentError when not passed a single argument
fails:File.split raises a TypeError if the argument is not a String type
fails:File.split coerces the argument with to_str if it is not a String type
fails:File.split accepts an object that has a #to_path method
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/stat_tags.txt
@@ -1,6 +1,4 @@
fails:File.stat returns a File::Stat object if the given file exists
fails:File.stat returns a File::Stat object when called on an instance of File
fails:File.stat accepts an object that has a #to_path method
fails:File.stat raises an Errno::ENOENT if the file does not exist
fails:File.stat returns information for a file that has been deleted but is still open
fails:File.stat returns a File::Stat object with file properties for a symlink
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/file/sticky_tags.txt
@@ -1,6 +1,3 @@
fails:File.sticky? returns false if the file dies not exist
fails:File.sticky? returns false if file does not exist
fails:File.sticky? returns false if the file has not sticky bit set
fails:File.sticky? returns true if the file has sticky bit set
fails:File.sticky? returns true if the named file has the sticky bit, otherwise false
fails:File.sticky? cannot set sticky bit to a normal file
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/symlink_tags.txt
Expand Up @@ -2,7 +2,5 @@ fails:File.symlink creates a symlink between a source and target file
fails:File.symlink creates a symbolic link
fails:File.symlink accepts args that have #to_path methods
fails:File.symlink raises an Errno::EEXIST if the target already exists
fails:File.symlink raises an ArgumentError if not called with two arguments
fails:File.symlink raises a TypeError if not called with String types
fails:File.symlink? returns true if the file is a link
fails:File.symlink? accepts an object that has a #to_path method
5 changes: 0 additions & 5 deletions spec/truffle/tags/core/file/to_path_tags.txt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/truffle/tags/core/file/truncate_tags.txt
Expand Up @@ -3,11 +3,7 @@ fails:File.truncate truncate a file size to 0
fails:File.truncate truncate a file size to 5
fails:File.truncate truncates to a larger file size than the original file
fails:File.truncate truncates to the same size as the original file
fails:File.truncate raises an Errno::ENOENT if the file does not exist
fails:File.truncate raises an ArgumentError if not passed two arguments
fails:File.truncate raises an Errno::EINVAL if the length argument is not valid
fails:File.truncate raises a TypeError if not passed a String type for the first argument
fails:File.truncate raises a TypeError if not passed an Integer type for the second argument
fails:File.truncate accepts an object that has a #to_path method
fails:File#truncate does not move the file write pointer to the specified byte offset
fails:File#truncate does not move the file read pointer to the specified byte offset
Expand All @@ -16,8 +12,4 @@ fails:File#truncate truncates a file size to 0
fails:File#truncate truncates a file size to 5
fails:File#truncate truncates a file to a larger size than the original file
fails:File#truncate truncates a file to the same size as the original file
fails:File#truncate raises an ArgumentError if not passed one argument
fails:File#truncate raises an Errno::EINVAL if the length argument is not valid
fails:File#truncate raises an IOError if file is closed
fails:File#truncate raises an IOError if file is not opened for writing
fails:File#truncate raises a TypeError if not passed an Integer type for the for the argument
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/file/unlink_tags.txt
@@ -1,5 +1 @@
fails:File.unlink returns 0 when called without arguments
fails:File.unlink deletes multiple files
fails:File.unlink raises an Errno::ENOENT when the given file doesn't exist
fails:File.unlink coerces a given parameter into a string if possible
fails:File.unlink accepts an object that has a #to_path method
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/world_readable_tags.txt
Expand Up @@ -3,5 +3,3 @@ fails:File.world_readable? returns nil if the file is chmod 000
fails:File.world_readable? returns nil if the file is chmod 700
fails:File.world_readable? returns a Fixnum if the file is chmod 644
fails:File.world_readable? returns a Fixnum if the file is a directory and chmod 644
fails:File.world_readable? coerces the argument with #to_path
fails:File.world_readable? returns nil if the file does not exist
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/file/world_writable_tags.txt
Expand Up @@ -3,5 +3,3 @@ fails:File.world_writable? returns nil if the file is chmod 000
fails:File.world_writable? returns nil if the file is chmod 700
fails:File.world_writable? returns a Fixnum if the file is chmod 777
fails:File.world_writable? returns a Fixnum if the file is a directory and chmod 777
fails:File.world_writable? coerces the argument with #to_path
fails:File.world_writable? returns nil if the file does not exist