/spec/tags/core/io/for_fd_tags.txt

http://github.com/MagLev/maglev · Plain Text · 47 lines · 47 code · 0 blank · 0 comment · 0 complexity · 68481189b6b31b9b8bec54fec680bd80 MD5 · raw file

  1. fails:IO.for_fd creates an IO instance from a Fixnum argument
  2. fails:IO.for_fd calls #to_int on an object to convert to a Fixnum
  3. fails:IO.for_fd raises an Errno::EBADF if the file descriptor is not valid
  4. fails:IO.for_fd raises an IOError if passed a closed stream
  5. fails:IO.for_fd raises an Errno::EINVAL if the new mode is not compatible with the descriptor's current mode
  6. fails:IO.for_fd uses the external encoding specified in the mode argument
  7. fails:IO.for_fd uses the external and the internal encoding specified in the mode argument
  8. fails:IO.for_fd uses the external encoding specified via the :external_encoding option
  9. fails:IO.for_fd uses the internal encoding specified via the :internal_encoding option
  10. fails:IO.for_fd uses the colon-separated encodings specified via the :encoding option
  11. fails:IO.for_fd ingores the :encoding option when the :external_encoding option is present
  12. fails:IO.for_fd ingores the :encoding option when the :internal_encoding option is present
  13. fails:IO.for_fd uses the encoding specified via the :mode option hash
  14. fails:IO.for_fd ignores the :internal_encoding option when the same as the external encoding
  15. fails:IO.for_fd sets internal encoding to nil when passed '-'
  16. fails:IO.for_fd sets binmode from mode string
  17. fails:IO.for_fd does not set binmode without being asked
  18. fails:IO.for_fd sets binmode from :binmode option
  19. fails:IO.for_fd does not set binmode from false :binmode
  20. fails:IO.for_fd accepts a :mode option
  21. fails:IO.for_fd accepts a mode argument set to nil with a valid :mode option
  22. fails:IO.for_fd accepts a mode argument with a :mode option set to nil
  23. fails:IO.for_fd raises an error if passed modes two ways
  24. fails:IO.for_fd raises an error if passed encodings two ways
  25. fails:IO.for_fd raises an error if passed binary/text mode two ways
  26. fails:IO.for_fd raises an error when trying to set both binmode and textmode
  27. fails:IO.for_fd sets external encoding to binary with binmode in mode string
  28. fails:IO.for_fd sets external encoding to binary with :binmode option
  29. fails:IO.for_fd does not use binary encoding when mode encoding is specified
  30. fails:IO.for_fd does not use binary encoding when :encoding option is specified
  31. fails:IO.for_fd does not use binary encoding when :external_encoding option is specified
  32. fails:IO.for_fd does not use binary encoding when :internal_encoding option is specified
  33. fails:IO.for_fd accepts nil options
  34. fails:IO.for_fd coerces mode with #to_str
  35. fails:IO.for_fd coerces mode with #to_int
  36. fails:IO.for_fd coerces mode with #to_str when passed in options
  37. fails:IO.for_fd coerces mode with #to_int when passed in options
  38. fails:IO.for_fd coerces :encoding option with #to_str
  39. fails:IO.for_fd coerces :external_encoding option with #to_str
  40. fails:IO.for_fd coerces :internal_encoding option with #to_str
  41. fails:IO.for_fd coerces options as third argument with #to_hash
  42. fails:IO.for_fd coerces options as second argument with #to_hash
  43. fails:IO.for_fd raises ArgumentError if not passed a hash or nil for options
  44. fails:IO.for_fd raises TypeError if passed a hash for mode and nil for options
  45. fails:IO.for_fd accepts an :autoclose option
  46. fails:IO.for_fd accepts any truthy option :autoclose
  47. fails:IO.for_fd raises ArgumentError if passed an empty mode string