From 76a37f8fba65a469861f44b35d8fcfaa94275862 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Mon, 13 Jul 2009 02:45:55 -0300
Subject: [PATCH 32/74] tests/behaviour: Add a test for jreadv()/jwritev()

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 tests/behaviour/t_normal.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/tests/behaviour/t_normal.py b/tests/behaviour/t_normal.py
index cb8ab91..5a84e54 100644
--- a/tests/behaviour/t_normal.py
+++ b/tests/behaviour/t_normal.py
@@ -332,4 +332,18 @@ def test_n20():
 	fsck_verify(n)
 	cleanup(n)
 
+def test_n21():
+	"jwritev and jreadv"
+	f, jf = bitmp()
+	n = f.name
+
+	jf.writev(["hello ", "world"])
+	l = [bytearray("......"), bytearray(".....")]
+	jf.lseek(0, 0)
+	jf.readv(l)
+
+	assert content(n) == "hello world"
+	assert l[0] == "hello " and l[1] == "world"
+	fsck_verify(n)
+	cleanup(n)
 
-- 
1.6.2.2.646.gb214


