We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 024821c commit 405dab3Copy full SHA for 405dab3
chapter04/data.txt
@@ -0,0 +1,4 @@
1
+Bradman 99.94 52 80 10 6996 334 29
2
+Pollock 60.97 23 41 4 2256 274 7
3
+Headley 60.83 22 40 4 2256 270* 10
4
+Sutcliffe 60.73 54 84 9 4555 194 16
chapter04/file_test.rb
@@ -0,0 +1,8 @@
+require "test/unit"
+
+class RunFileTest < Test::Unit::TestCase
+ def test_read_4th_character
5
+ contents = File.read('data.txt')
6
+ assert_equal 'd', contents[3, 1]
7
+ end
8
+end
0 commit comments