summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-03 22:52:53 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-03 22:52:53 -0700
commitd81f0bf1ee13d0054f15fee94f98bb5b5b494d7a (patch)
treeb89fbbfb1f5fe3050a2ced718b16ddf5e3947391 /t
parentd191a33ce44be3c4e8242fd0b3abed365a9abf20 (diff)
downloadp5-Git-Annex-d81f0bf1ee13d0054f15fee94f98bb5b5b494d7a.tar.gz
change what Git::Annex:BatchCommand::say does in scalar context
I believe this is more useful. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 't')
-rwxr-xr-xt/13_batchcommand.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/13_batchcommand.t b/t/13_batchcommand.t
index e2e5cce..3d72e8f 100755
--- a/t/13_batchcommand.t
+++ b/t/13_batchcommand.t
@@ -46,11 +46,13 @@ with_temp_annexes {
"it passes --batch to git-annex";
my ($response1, $response2) = $batch->say("foo/foo2/baz", "foo/foo2/baz");
is $response1, $response2, "it returns a list in list context";
- is scalar $batch->say("foo/foo2/baz", "foo/foo2/baz"), 2,
- "it returns a scalar in scalar context";
my ($response3, $response4) = $batch->say("foo/foo2/baz", "foo/bar");
is_deeply [$response3, $response4], ["foo/foo2/baz", ""],
"it returns results in the correct order";
+ my $response5 = $batch->say("foo/foo2/baz");
+ is $response5, "foo/foo2/baz", "it returns a single result into a scalar";
+ my ($response6) = $batch->say("foo/foo2/baz");
+ is $response6, "foo/foo2/baz", "it still returns a list in list context";
undef $batch;
ok !kill(0, $second_pid),