mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancements - Hooks
- Make the hooks unit tests pass if Lua support is not included. We don't like yellow in the tinderbox.
This commit is contained in:
parent
585cbdfcac
commit
ea2d57edd3
2 changed files with 22 additions and 5 deletions
|
@ -46,9 +46,17 @@ if (open my $fh, '>', 'hook')
|
||||||
ok (-r 'hook', 'Created hook');
|
ok (-r 'hook', 'Created hook');
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the hook.
|
my $output = qx{../task rc:hook.rc version};
|
||||||
my $output = qx{../task rc:hook.rc _version};
|
if ($output =~ /PUC-Rio/)
|
||||||
like ($output, qr/^marker.+\n\d\.\d+\.\d+\n$/ms, 'Found marker before output');
|
{
|
||||||
|
# Test the hook.
|
||||||
|
$output = qx{../task rc:hook.rc _version};
|
||||||
|
like ($output, qr/^marker.+\n\d\.\d+\.\d+\n$/ms, 'Found marker before output');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pass ('Found marker before output - skip: no Lua support');
|
||||||
|
}
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
|
|
|
@ -47,8 +47,17 @@ if (open my $fh, '>', 'hook')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test the hook.
|
# Test the hook.
|
||||||
my $output = qx{../task rc:hook.rc _version};
|
my $output = qx{../task rc:hook.rc version};
|
||||||
like ($output, qr/\n\d\.\d+\.\d+\nmarker\n$/ms, 'Found marker after output');
|
if ($output =~ /PUC-Rio/)
|
||||||
|
{
|
||||||
|
# Test the hook.
|
||||||
|
$output = qx{../task rc:hook.rc _version};
|
||||||
|
like ($output, qr/\n\d\.\d+\.\d+\nmarker\n$/ms, 'Found marker after output');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pass ('Found marker after output - skipping: no Lua support');
|
||||||
|
}
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue