[svk-commit] r3016 - trunk/t
nobody at bestpractical.com
nobody at bestpractical.com
Sat Jul 26 02:55:15 EDT 2008
Author: clsung
Date: Sat Jul 26 02:55:14 2008
New Revision: 3016
Added:
trunk/t/23commit-local-file-to-add.t
Log:
- try to reproduce the error from http://task.hm/EOLZ
- tried to switch a ? to an "A" in a checkout in local. boom!
Added: trunk/t/23commit-local-file-to-add.t
==============================================================================
--- (empty file)
+++ trunk/t/23commit-local-file-to-add.t Sat Jul 26 02:55:14 2008
@@ -0,0 +1,56 @@
+use Test::More tests => 4;
+use strict;
+use SVK::Test;
+our($output, $answer);
+my ($xd, $svk) = build_test();
+$svk->mkdir ('-m', 'init', '//V');
+my $tree = create_basic_tree ($xd, '//V');
+my ($copath, $corpath) = get_copath ('commit-local-file-to-add');
+mkdir($copath);
+chdir($copath);
+is_output ($svk, 'checkout', ['//V/A'],
+ ["Syncing //V/A(/V/A) in ".__"$corpath/A to 3.",
+ 'A A/Q',
+ 'A A/Q/qu',
+ 'A A/Q/qz',
+ 'A A/be']);
+
+ok (-e 'A/Q/qu');
+
+overwrite_file("A/boo", "new file\n");
+append_file("A/Q/qu", "to have commit work\n");
+append_file("A/Q/qz", "to have commit work\n");
+
+chdir('A');
+is_output($svk, 'status', [],
+ ['M Q/qu',
+ 'M Q/qz',
+ '? boo']);
+
+sub set_editor_add
+{
+set_editor(<< 'TMP');
+$_ = shift;
+open _ or die $!;
+ at _ = <_>;
+# simulate some editing, for --template test
+s/^\?/A/g for @_;
+close _;
+unlink $_;
+open _, '>', $_ or die $!;
+print _ @_;
+close _;
+print @_;
+TMP
+}
+
+
+TODO: {
+local $TODO = 'change ? to A';
+
+set_editor_add();
+is_output($svk, 'commit',[],
+ ['Waiting for editor...',
+ 'A boo',
+ 'Committed revision 4.']);
+}
More information about the svk-commit
mailing list