diff options
author | Duncaen <mail@duncano.de> | 2017-06-25 00:11:06 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-06-25 15:48:11 +0200 |
commit | 880f08417715dc5e37662b7cc7dde08b9ff2695e (patch) | |
tree | ce851b6348f157dbc38903514eaacf7306875827 | |
parent | 7577a4a9346b2cfde1ed1da720c915dcfb847b0c (diff) | |
download | mblaze-880f08417715dc5e37662b7cc7dde08b9ff2695e.tar.gz mblaze-880f08417715dc5e37662b7cc7dde08b9ff2695e.tar.xz mblaze-880f08417715dc5e37662b7cc7dde08b9ff2695e.zip |
mseq: remove the ,2: suffix from the file we search for and add testcase
This fixes #38 Closes: #39 [via git-merge-pr]
-rw-r--r-- | mseq.c | 3 | ||||
-rw-r--r-- | t/8000-mflag.t | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mseq.c b/mseq.c index 733b141..1b27104 100644 --- a/mseq.c +++ b/mseq.c @@ -96,6 +96,9 @@ search(char *file) if (!namefind(dir)) namescan(dir); + if ((e = strstr(file, ":2,"))) + *e = 0; + return namefind(file); } diff --git a/t/8000-mflag.t b/t/8000-mflag.t index 166f741..e4ab70e 100644 --- a/t/8000-mflag.t +++ b/t/8000-mflag.t @@ -1,7 +1,7 @@ #!/bin/sh -e cd ${0%/*} . ./lib.sh -plan 12 +plan 16 rm -rf test.dir mkdir test.dir @@ -31,5 +31,9 @@ check 'unmark flagged' 'mflag -f 1 && [ -e "inbox/cur/1:2,S" ]' check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l' check 'unmark seen' 'mflag -s 1 && [ -e "inbox/cur/1:2," ]' check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l' +check 'mark trashed' 'mflag -T 1 && [ -e "inbox/cur/1:2,T" ]' +check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l' +check 'unmark trashed' 'mflag -t 1 && [ -e "inbox/cur/1:2," ]' +check_test 'fix seq' -eq 2 'mseq -f | mseq -S | wc -l' ) |