42 lines
883 B
Bash
42 lines
883 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
TMPDIR=$(mktemp -d)
|
||
|
|
||
|
#! On ne teste pas que l'on peut bien récupérer ces chemins automatiquement,
|
||
|
#! ce qui peut-être une source d'erreurs
|
||
|
export TAKL_DB="$TMPDIR/takl.sqlite3"
|
||
|
export TAKL_SOCKET="$TMPDIR/takl.socket"
|
||
|
echo "Using $TMPDIR"
|
||
|
|
||
|
make -j
|
||
|
|
||
|
# Catégories
|
||
|
./takl add "nocategory"
|
||
|
./takl add "category1:test1"
|
||
|
|
||
|
# Dates
|
||
|
./takl add "date:avec date" min+5
|
||
|
./takl add "date:avec date2" h+5
|
||
|
./takl add "date:avec date3" j+5
|
||
|
./takl add "date:avec date4" "31/12"
|
||
|
|
||
|
TASK_ID=$(./takl add "done soon" | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' | awk '-F[' '{ print $2 }' | awk '-F]' '{ print $1 }')
|
||
|
|
||
|
# List
|
||
|
./takl list
|
||
|
./takl list date
|
||
|
|
||
|
# Reschedule
|
||
|
./takl reschedule $TASK_ID "22/11"
|
||
|
|
||
|
# Get info
|
||
|
./takl info $TASK_ID
|
||
|
|
||
|
# Mark as done
|
||
|
./takl done $TASK_ID
|
||
|
./takl list -a
|
||
|
|
||
|
./takl rm $TASK_ID
|
||
|
|
||
|
#* À rajouter: tests sur le fait que les changements ont bien eu lieu
|
||
|
rm $TMPDIR -r
|