last.sh will exit 1 when no file found; handle it in next.sh. meaning um next works in empty dirs
This commit is contained in:
parent
b4a7b6a1b1
commit
cf6ff3349d
6 changed files with 47 additions and 19 deletions
|
|
@ -10,6 +10,7 @@ setup() {
|
|||
# FIXME: why isn't this working?
|
||||
# PATH="$DIR/../:$PATH"
|
||||
# commands depend on being in the journal/ path.
|
||||
export ORIGPWD=`pwd`
|
||||
cd $DIR/mockjournal
|
||||
# so that we can run next.sh without dealing with emacsclient.
|
||||
export UMNEXTECHO=true
|
||||
|
|
@ -17,7 +18,8 @@ setup() {
|
|||
|
||||
teardown() {
|
||||
export UMNEXTECHO=false
|
||||
cd -
|
||||
cd $ORIGPWD
|
||||
git restore $DIR/mockjournal
|
||||
}
|
||||
|
||||
@test "um usage" {
|
||||
|
|
@ -67,6 +69,13 @@ um_next_awk() {
|
|||
assert_output '099.poo.md'
|
||||
}
|
||||
|
||||
@test "um last empty" {
|
||||
cd foo
|
||||
run um last
|
||||
assert_failure
|
||||
assert_output 'no files found'
|
||||
}
|
||||
|
||||
@test "um cat" {
|
||||
run um cat 001.md 002.blah.md
|
||||
assert_output '# 001
|
||||
|
|
|
|||
Loading…
Reference in a new issue