@@ -849,7 +849,7 @@ mktempdir() do dir
849849 verbose && println (" $name write(::IOBuffer, ...)" )
850850 @compat to = IOBuffer (UInt8[convert (UInt8, _) for _ in text], false , true )
851851 write (to, io ())
852- @test takebuf_string (to ) == text
852+ @test String ( take! (to) ) == text
853853
854854 cleanup ()
855855 end
@@ -1106,7 +1106,7 @@ end
11061106
11071107for (Fun, func) in [(:AndFun , :& ),
11081108 (:OrFun , :| ),
1109- (:XorFun , :$ ),
1109+ (:XorFun , :⊻ ),
11101110 (:AddFun , :+ ),
11111111 (:DotAddFun , :.+ ),
11121112 (:SubFun , :- ),
@@ -1250,7 +1250,7 @@ end
12501250
12511251let io = IOBuffer (), s = " hello"
12521252 unsafe_write (io, pointer (s), length (s))
1253- @test takebuf_string (io ) == s
1253+ @test String ( take! (io) ) == s
12541254end
12551255
12561256@static if VERSION ≥ v " 0.4"
@@ -1512,3 +1512,15 @@ end
15121512
15131513@test xor (1 ,5 ) == 4
15141514@test 1 ⊻ 5 == 4
1515+
1516+ # julia#19246
1517+ @test numerator (1 // 2 ) === 1
1518+ @test denominator (1 // 2 ) === 2
1519+
1520+ # julia#19088
1521+ let io = IOBuffer ()
1522+ write (io, " aaa" )
1523+ @test take! (io) == UInt8[' a' , ' a' , ' a' ]
1524+ write (io, " bbb" )
1525+ @test String (take! (io)) == " bbb"
1526+ end
0 commit comments