mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-11 13:10:32 +00:00
mseq: remove the ,2: suffix from the file we search for and add testcase
This fixes #38
This commit is contained in:
parent
7577a4a934
commit
730942b06e
2
mseq.c
2
mseq.c
@ -96,6 +96,8 @@ search(char *file)
|
||||
if (!namefind(dir))
|
||||
namescan(dir);
|
||||
|
||||
if ((e = strstr(file, ":2,")))
|
||||
*e = 0;
|
||||
return namefind(file);
|
||||
}
|
||||
|
||||
|
@ -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'
|
||||
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user