Skip to content
Permalink
Browse files

Unimplemented pack operators just raise a NotImplementedError, not se…

…gfault. Run more dir tests.
  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 21, 2013
1 parent ec16436 commit 2f11fd3d4854f4d5ea151905ad3fcaaa098b43d2
@@ -0,0 +1,4 @@
fails:Dir.delete raises an Errno::ENOTEMPTY when trying to remove a nonempty directory
fails:Dir.delete raises an Errno::ENOENT when trying to remove a non-existing directory
fails:Dir.delete raises an Errno::ENOTDIR when trying to remove a non-directory
fails:Dir.delete raises an Errno::EACCES if lacking adequate permissions to remove the directory
@@ -0,0 +1,4 @@
fails:Dir.mkdir creates the named directory with the given permissions
fails:Dir.mkdir calls #to_path on non-String arguments
fails:Dir.mkdir raises Errno::EEXIST if the specified directory already exists
fails:Dir.mkdir raises Errno::EEXIST if the argument points to the existing file
@@ -0,0 +1 @@
fails:Dir.pwd correctly displays dirs with unicode characters in them
@@ -0,0 +1,4 @@
fails:Dir.rmdir raises an Errno::ENOTEMPTY when trying to remove a nonempty directory
fails:Dir.rmdir raises an Errno::ENOENT when trying to remove a non-existing directory
fails:Dir.rmdir raises an Errno::ENOTDIR when trying to remove a non-directory
fails:Dir.rmdir raises an Errno::EACCES if lacking adequate permissions to remove the directory
@@ -0,0 +1,4 @@
fails:Dir.unlink raises an Errno::ENOTEMPTY when trying to remove a nonempty directory
fails:Dir.unlink raises an Errno::ENOENT when trying to remove a non-existing directory
fails:Dir.unlink raises an Errno::ENOTDIR when trying to remove a non-directory
fails:Dir.unlink raises an Errno::EACCES if lacking adequate permissions to remove the directory
@@ -57,29 +57,6 @@ class MSpecScript
"^#{Rubyspec}/core/file/stat/ftype_spec.rb",
"^#{Rubyspec}/core/file/socket_spec.rb",
"^#{Rubyspec}/core/file/ftype_spec.rb",
"^#{Rubyspec}/core/dir/close_spec.rb",
"^#{Rubyspec}/core/dir/delete_spec.rb",
"^#{Rubyspec}/core/dir/each_spec.rb",
"^#{Rubyspec}/core/dir/element_reference_spec.rb",
"^#{Rubyspec}/core/dir/entries_spec.rb",
"^#{Rubyspec}/core/dir/exist_spec.rb",
"^#{Rubyspec}/core/dir/exists_spec.rb",
"^#{Rubyspec}/core/dir/foreach_spec.rb",
"^#{Rubyspec}/core/dir/getwd_spec.rb",
"^#{Rubyspec}/core/dir/glob_spec.rb",
"^#{Rubyspec}/core/dir/home_spec.rb",
"^#{Rubyspec}/core/dir/inspect_spec.rb",
"^#{Rubyspec}/core/dir/mkdir_spec.rb",
"^#{Rubyspec}/core/dir/open_spec.rb",
"^#{Rubyspec}/core/dir/path_spec.rb",
"^#{Rubyspec}/core/dir/pos_spec.rb",
"^#{Rubyspec}/core/dir/pwd_spec.rb",
"^#{Rubyspec}/core/dir/read_spec.rb",
"^#{Rubyspec}/core/dir/rewind_spec.rb",
"^#{Rubyspec}/core/dir/rmdir_spec.rb",
"^#{Rubyspec}/core/dir/seek_spec.rb",
"^#{Rubyspec}/core/dir/tell_spec.rb",
"^#{Rubyspec}/core/dir/unlink_spec.rb",
"^#{Rubyspec}/core/file/open_spec.rb",
"^#{Rubyspec}/core/io/dup_spec.rb",
"^#{Rubyspec}/core/io/sysopen_spec.rb",
@@ -118,7 +118,10 @@ def interpret(self, space):
def operate(self, space):
indices = self.interpret(space)
for idx, reps in indices:
pack_operators[idx](space, self, reps)
op = pack_operators[idx]
if op is None:
raise space.error(space.w_NotImplementedError, "Operator %s" % chr(idx))
op(space, self, reps)
return self.result


0 comments on commit 2f11fd3

Please sign in to comment.
You can’t perform that action at this time.