summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2016-06-21 09:49:34 +0900
committerTomoyuki Sahara <[email protected]>2016-06-21 09:49:34 +0900
commit2af2a4fff838ef7f84a357252ab3afe8d8359b68 (patch)
tree08ce40f652051e3bcda7c1563b5000f1228ab56f /test
parent1c4428880b2f0f0fcd81ea2debc5f4459a7ed53c (diff)
downloadmruby-2af2a4fff838ef7f84a357252ab3afe8d8359b68.tar.gz
mruby-2af2a4fff838ef7f84a357252ab3afe8d8359b68.zip
add IO#isatty and IO#tty?
Diffstat (limited to 'test')
-rw-r--r--test/io.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/io.rb b/test/io.rb
index ee0432b14..da94360d7 100644
--- a/test/io.rb
+++ b/test/io.rb
@@ -262,6 +262,18 @@ assert('IO#_read_buf') do
io.closed?
end
+assert('IO#isatty') do
+ f1 = File.open("/dev/tty")
+ f2 = File.open($mrbtest_io_rfname)
+
+ assert_true f1.isatty
+ assert_false f2.isatty
+
+ f1.close
+ f2.close
+ true
+end
+
assert('IO#pos=, IO#seek') do
fd = IO.sysopen $mrbtest_io_rfname
io = IO.new fd