tests/tasklists.t @ 2cc19f841df2

Die if there are any newlines inside the task text

The `t` file format is line-based, so newlines break the file format.  We'd have
to escape them or something, but that opens a whole can of worms, and `t` is
supposed to be simple, so we'll just forbid them.

Fixes https://github.com/sjl/t/issues/26
author Steve Losh <steve@stevelosh.com>
date Sat, 11 Apr 2020 11:23:45 -0400
parents a882490073a1
children d76f573934d1
Setup:

  $ alias xt="python $TESTDIR/../t.py --list `pwd`"

Initialize multiple task lists:

  $ xt --list beer Dogfish Head 120 minute IPA
  $ xt --list books Your Inner Fish
  $ xt --list beer
  7 - Dogfish Head 120 minute IPA
  $ xt --list books
  0 - Your Inner Fish

Wrong lists:

  $ xt --list beer -f 0
  The ID "0" does not match any task.%
  $ xt --list books -f 7
  The ID "7" does not match any task.%
  $ xt --list beer
  7 - Dogfish Head 120 minute IPA
  $ xt --list books
  0 - Your Inner Fish

Right lists:

  $ xt --list beer -f 7
  $ xt --list books -f 0
  $ xt --list beer
  $ xt --list books