Commits

Armin Rigo  committed 3c18741

Test for buffering issues in PyPy.

  • Participants
  • Parent commits 77df9af

Comments (0)

Files changed (1)

     #
     import posix
     fdr, fdw = posix.pipe()
-    fr1 = posix.fdopen(fdr, 'r')
-    fw1 = posix.fdopen(fdw, 'w')
+    fr1 = posix.fdopen(fdr, 'r', 256)
+    fw1 = posix.fdopen(fdw, 'w', 256)
     #
+    fw1.write(b"X")
     res = fputs(b"hello world\n", fw1)
     assert res >= 0
     fw1.close()
     p = newp(new_array_type(BCharP, 100), None)
     res = fscanf(fr1, b"%s\n", p)
     assert res == 1
-    assert string(p) == b"hello"
+    assert string(p) == b"Xhello"
     fr1.close()
 
 def test_FILE_only_for_FILE_arg():