(um-next) : change the um/next.sh interface to call this function
um/next.sh now has minimal elisp, and calls this function instead, and only prints the next file with UMNEXTPRINT so that (um-next-shell) can just get the next file and feed it into (next-file) and we don't have to call (undo) to leave out the header
This commit is contained in:
parent
cd69c9af55
commit
e28aca4de0
3 changed files with 42 additions and 21 deletions
|
|
@ -13,11 +13,11 @@ setup() {
|
|||
export ORIGPWD=`pwd`
|
||||
cd $DIR/mockjournal
|
||||
# so that we can run next.sh without dealing with emacsclient.
|
||||
export UMNEXTECHO=true
|
||||
export UMNEXTTEST=true
|
||||
}
|
||||
|
||||
teardown() {
|
||||
export UMNEXTECHO=false
|
||||
export UMNEXTTEST=false
|
||||
cd $ORIGPWD
|
||||
git restore $DIR/mockjournal
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ um_next_awk() {
|
|||
|
||||
@test "um next empty elisp" {
|
||||
run um next
|
||||
assert_output '(progn (setq um-next-file "100.md") (find-file um-next-file) (um-journal-header) (message "creating 100.md"))'
|
||||
assert_output '(um-next "100.md")'
|
||||
}
|
||||
|
||||
@test "um next descriptor" {
|
||||
|
|
@ -56,12 +56,12 @@ um_next_awk() {
|
|||
|
||||
@test "um next descriptor tag" {
|
||||
run um next foo bar
|
||||
assert_output --partial '(insert "+ bar\n")'
|
||||
assert_output '(um-next "100.foo.md" "bar")'
|
||||
}
|
||||
|
||||
@test "um next descriptor +" {
|
||||
run um next foo +
|
||||
assert_output --partial '(insert "+ foo\n")'
|
||||
assert_output '(um-next "100.foo.md" "foo")'
|
||||
}
|
||||
|
||||
@test "um last" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue