Index: trunk/Nebulous/t/58_client_open.t
===================================================================
--- trunk/Nebulous/t/58_client_open.t	(revision 17081)
+++ trunk/Nebulous/t/58_client_open.t	(revision 17448)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 58_client_open.t,v 1.1 2005-12-03 02:52:31 jhoblitt Exp $
+# $Id: 58_client_open.t,v 1.2 2008-04-18 00:08:23 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use Apache::Test qw( -withtestmore );
 
-plan tests => 8;
+plan tests => 10;
 
 use lib qw( ./t ./lib );
@@ -17,4 +17,5 @@
 use Nebulous::Util qw( :standard );
 use Test::Nebulous;
+use File::stat;
 
 my $hostport = Apache::Test->config->{ 'hostport' };
@@ -68,4 +69,21 @@
 Test::Nebulous->setup;
 
+# truncation test
+{
+    my $neb = Nebulous::Client->new(
+        proxy => "http://$hostport/nebulous",
+    );
+    my $fh = $neb->open( "foo", 'write' );
+    print $fh "foobar";
+    close $fh;
+
+    $fh = $neb->open( "foo", '>' );
+    ok($fh, "open in trucate mode" );
+    my $sb = stat($fh);
+    is($sb->size, 0, "file was truncated");
+}
+
+Test::Nebulous->setup;
+
 {
     my $neb = Nebulous::Client->new(
