TW-28, TW-271, TW-277, TW-752, TW-1265

- TW-1265 cannot add UDA with underscore (thanks to Jakub Wilk).
- Added unit tests for TW-1265.
- Added ChangeLog and AUTHOR entries for other fixed issues.
This commit is contained in:
Paul Beckingham 2014-05-31 11:11:53 -04:00
parent 4694cfe0fe
commit 6514bdfc4d
4 changed files with 28 additions and 18 deletions

View file

@ -213,3 +213,4 @@ suggestions:
darkfeline
Onion
Milos Svantner
Christopher Roberts

View file

@ -21,6 +21,7 @@
- #1511 sync init crashes if client certification file is empty or invalid
(thanks to Marton Suranyi).
- TW-5 color.due.today does not work (thanks to Max Muller).
- TW-28 Inserts spaces before punctuation characters (thanks to Matt Kraai).
- TW-115 allow "0day" durations for UDAs.
- TW-197 New virtual tag READY.
- TW-253 Unrecognized taskwarrior file format. in
@ -29,9 +30,12 @@
- TW-255 'Mask' instead of 'iMask' shown in info report (thanks to Benjamin
Weber)
- TW-261 Easy to create "not deletable" task (thanks to Jan Kunder).
- TW-271 Parser still looks for task id even when -- is used (thanks to Jim B).
- TW-277 Complex filters can skip infix term expansion.
- TW-278 Cygwin throws warnings building mk_wcwidth() in wcwidth6.c.
- TW-285 DUETODAY doesn't give any output (thanks to Jostein Berntsen).
- TW-306 Wrong date format in burndown view (thanks to Michele Santullo).
- TW-752 task ID no longer defaults to info (thanks to Christopher Roberts).
- TW-1254 Calc command can segfault on negative numbers (thanks to Renato
Alves).
- TW-1255 New testing framework (thanks to Renato Alves).
@ -42,6 +46,7 @@
Renato Alves).
- TW-1263 Command Reference Redesign.
- TW-1264 Project | Tags assigned ratio of tasks (thanks to Benjamin Weber).
- TW-1265 cannot add UDA with underscore (thanks to Jakub Wilk).
- TW-1274 Map 'modification' attribute to 'modified' (thanks to jck).
- TW-1278 Next report filters tasks with due date set until due date arrives
(thanks to Renato Alves).

View file

@ -1036,7 +1036,7 @@ bool Nibbler::getName (std::string& result)
{
++i;
while (i < _length &&
! ispunct (_input[i]) &&
(_input[i] == '_' || ! ispunct (_input[i])) &&
! Lexer::is_ws (_input[i]))
{
++i;
@ -1255,7 +1255,7 @@ bool Nibbler::depleted ()
}
////////////////////////////////////////////////////////////////////////////////
// Override of ispunct, that considers #, $ and @ not to be punctuation.
// Override of ispunct, that considers #, $, _ and @ not to be punctuation.
//
// ispunct: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
// Punctuation: ! " % & ' ( ) * + , - . / : ; < = > ? [ \ ] ^ _ ` { | } ~
@ -1263,7 +1263,7 @@ bool Nibbler::depleted ()
//
bool Nibbler::isPunctuation (char c)
{
if (c == '@' || c == '#' || c == '$')
if (c == '@' || c == '#' || c == '$' || c == '_')
return false;
return ispunct (c);

View file

@ -654,25 +654,29 @@ int main (int argc, char** argv)
// bool getName (std::string&);
t.diag ("Nibbler::getName");
n = Nibbler ("a1 one one.two 9");
t.ok (n.getName (s), "'a1 one one.two 9' getName -> ok");
t.is (s, "a1", " ' one one.two 9' getName -> 'a1'");
t.ok (n.skipWS (), " 'one one.two 9' skipWS -> ok");
n = Nibbler ("a1 one one.two 9 foo_bar");
t.ok (n.getName (s), "'a1 one one.two 9 foo_bar' getName -> ok");
t.is (s, "a1", " ' one one.two 9 foo_bar' getName -> 'a1'");
t.ok (n.skipWS (), " 'one one.two 9 foo_bar' skipWS -> ok");
t.ok (n.getName (s), " 'one one.two 9' getName -> ok");
t.is (s, "one", " ' one.two 9' getName -> 'one'");
t.ok (n.skipWS (), " 'one.two 9' skipWS -> ok");
t.ok (n.getName (s), " 'one one.two 9 foo_bar' getName -> ok");
t.is (s, "one", " ' one.two 9 foo_bar' getName -> 'one'");
t.ok (n.skipWS (), " 'one.two 9 foo_bar' skipWS -> ok");
t.ok (n.getName (s), " 'one.two 9' getName -> ok");
t.is (s, "one", " '.two 9' getName -> 'one'");
t.ok (n.skip ('.'), " 'two 9' skip . -> ok");
t.ok (n.getName (s), " 'one.two 9 foo_bar' getName -> ok");
t.is (s, "one", " '.two 9 foo_bar' getName -> 'one'");
t.ok (n.skip ('.'), " 'two 9 foo_bar' skip . -> ok");
t.ok (n.getName (s), " 'two 9' getName -> ok");
t.is (s, "two", " ' 9' getName -> 'two'");
t.ok (n.skipWS (), " '9' skipWS -> ok");
t.ok (n.getName (s), " 'two 9 foo_bar' getName -> ok");
t.is (s, "two", " ' 9 foo_bar' getName -> 'two'");
t.ok (n.skipWS (), " '9 foo_bar' skipWS -> ok");
t.notok (n.getName (s), " '9' getName -> not ok");
t.ok (n.skip ('9'), " '' skip 9 -> ok");
t.notok (n.getName (s), " '9 foo_bar' getName -> not ok");
t.ok (n.skip ('9'), " ' foo_bar' skip 9 -> ok");
t.ok (n.skipWS (), " 'foo_bar' skipWS -> ok");
t.ok (n.getName (s), " 'foo_bar' getName -> ok");
t.is (s, "foo_bar", " '' getName -> 'foo_bar'");
t.ok (n.depleted (), "depleted");
n = Nibbler ("entrée");