TW-230, TW-1329

- TW-230 Filter tasks on partial UUIDs (thanks to Paul Kishimoto).
- TW-1329 Short UUIDs (thanks to Benjamin Weber).
This commit is contained in:
Paul Beckingham 2014-07-01 23:56:53 -04:00
parent e663072088
commit 5413d3172b
4 changed files with 31 additions and 24 deletions

View file

@ -32,6 +32,7 @@
- TW-218 Reveal terms of urgency calculation for a given task (thanks to Max
Muller).
- TW-221 Migrate task-faq man page to the Wiki.
- TW-230 Filter tasks on partial UUIDs (thanks to Paul Kishimoto).
- TW-242 extra Space when annotating a path/filename, taskopen can not open the
file (thanks to Andreas Kalex).
- TW-244 task add "Description (Information)" results in
@ -98,6 +99,7 @@
(thanks to Kosta Harlan).
- TW-1321 Unit test view.t fails oddly on Ubuntu 13.10 (thanks to John West).
- TW-1324 Numeric UDAs are compared as strings (thanks to Ben Boeckel).
- TW-1329 Short UUIDs (thanks to Benjamin Weber).
- TW-1331 date more than 5 years away is faulty (thanks to Onion).
- TW-1336 Project attribute does not allow whitespace (thanks to Benjamin Weber).
- TW-1341 confirmation config setting should apply to config command as well

View file

@ -40,7 +40,7 @@
#include <Lexer.h>
static const char* _uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
static const unsigned int _uuid_min_length = 14;
static const unsigned int _uuid_min_length = 8;
////////////////////////////////////////////////////////////////////////////////
Nibbler::Nibbler ()

View file

@ -157,27 +157,27 @@ like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{13})/;
$output = qx{../src/task rc:$rc $short list 2>&1};
unlike ($output, qr/one/, "Not found with $short");
like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{12})/;
$output = qx{../src/task rc:$rc $short list 2>&1};
unlike ($output, qr/one/, "Not found with $short");
like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{11})/;
$output = qx{../src/task rc:$rc $short list 2>&1};
unlike ($output, qr/one/, "Not found with $short");
like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{10})/;
$output = qx{../src/task rc:$rc $short list 2>&1};
unlike ($output, qr/one/, "Not found with $short");
like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{9})/;
$output = qx{../src/task rc:$rc $short list 2>&1};
unlike ($output, qr/one/, "Not found with $short");
like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{8})/;
$output = qx{../src/task rc:$rc $short list 2>&1};
unlike ($output, qr/one/, "Not found with $short");
like ($output, qr/one/, "Found with $short");
($short) = $uuid =~ /^(.{7})/;
$output = qx{../src/task rc:$rc $short list 2>&1};

View file

@ -40,16 +40,15 @@ int main (int argc, char** argv)
{
#ifdef NIBBLER_FEATURE_DATE
#ifdef NIBBLER_FEATURE_REGEX
UnitTest t (408);
UnitTest t (417);
#else
UnitTest t (384);
UnitTest t (378);
UnitTest t (387);
#endif
#else
#ifdef NIBBLER_FEATURE_REGEX
UnitTest t (344);
UnitTest t (353);
#else
UnitTest t (320);
UnitTest t (329);
#endif
#endif
@ -499,28 +498,34 @@ int main (int argc, char** argv)
t.ok (n.depleted (), "depleted");
n = Nibbler ("a0b1c2d3-e4f5");
t.notok (n.getPartialUUID (s), "partial uuid [13] not found");
t.notok (n.depleted (), "depleted");
t.ok (n.getPartialUUID (s), "partial uuid [13] found");
t.is (s, "a0b1c2d3-e4f5", "partial uuid [13] -> correct");
t.ok (n.depleted (), "depleted");
n = Nibbler ("a0b1c2d3-e4f");
t.notok (n.getPartialUUID (s), "partial uuid [12] not found");
t.notok (n.depleted (), "depleted");
t.ok (n.getPartialUUID (s), "partial uuid [12] found");
t.is (s, "a0b1c2d3-e4f", "partial uuid [12] -> correct");
t.ok (n.depleted (), "depleted");
n = Nibbler ("a0b1c2d3-e4");
t.notok (n.getPartialUUID (s), "partial uuid [11] not found");
t.notok (n.depleted (), "depleted");
t.ok (n.getPartialUUID (s), "partial uuid [11] found");
t.is (s, "a0b1c2d3-e4", "partial uuid [11] -> correct");
t.ok (n.depleted (), "depleted");
n = Nibbler ("a0b1c2d3-e");
t.notok (n.getPartialUUID (s), "partial uuid [10] not found");
t.notok (n.depleted (), "depleted");
t.ok (n.getPartialUUID (s), "partial uuid [10] found");
t.is (s, "a0b1c2d3-e", "partial uuid [10] -> correct");
t.ok (n.depleted (), "depleted");
n = Nibbler ("a0b1c2d3-");
t.notok (n.getPartialUUID (s), "partial uuid [9] not found");
t.notok (n.depleted (), "depleted");
t.ok (n.getPartialUUID (s), "partial uuid [9] found");
t.is (s, "a0b1c2d3-", "partial uuid [9] -> correct");
t.ok (n.depleted (), "depleted");
n = Nibbler ("a0b1c2d3");
t.notok (n.getPartialUUID (s), "partial uuid [8] not found");
t.notok (n.depleted (), "not depleted");
t.ok (n.getPartialUUID (s), "partial uuid [8] found");
t.is (s, "a0b1c2d3", "partial uuid [8] -> correct");
t.ok (n.depleted (), "not depleted");
// bool getDateISO (time_t&);
t.diag ("Nibbler::getDateISO");