tests/editing.t @ d76f573934d1

Fix tests
author Steve Losh <steve@stevelosh.com>
date Sat, 11 Apr 2020 11:31:40 -0400
parents 6af374f52295
children 831123b0359f
Setup:

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

Replace a task's text (preserving the ID):

  $ xt Sample.
  $ xt
  a - Sample.
  $ xt -e a New sample.
  $ xt
  d - New sample.
  $ xt 'this | that'
  $ xt
  4 - this | that
  d - New sample.
  $ xt -e 4 'this &| that'
  $ xt
  d1 - this &| that
  df - New sample.

Sed-style substitution:

  $ xt -e a 's/New/Testing/'
  error: the ID "a" does not match any task
  [1]
  $ xt
  d1 - this &| that
  df - New sample.
  $ xt -e 4 '/this &/this /'
  error: the ID "4" does not match any task
  [1]
  $ xt
  d1 - this &| that
  df - New sample.