File: 08-exclude

package info (click to toggle)
syncmaildir 1.2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,180 kB
  • ctags: 476
  • sloc: ansic: 6,338; sh: 1,969; makefile: 258; xml: 14
file content (16 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

mkdir -p a/b/c/
mkdir -p a/b/d/new
cp Mail/cur/* a/b/d/new
mv Mail/cur a/b/c/
rm -rf Mail
mdiff --exclude '*/new' -l a
assert `wc -l log.mddiff | cut -d ' ' -f 1` 1 "not excluding new"
mdiff --exclude '*/new' a
assert `grep 'ADD a/b/c/cur' log.mddiff | wc -l` 100 "not 100 mails"
mdiff --exclude 'b' a
assert `grep 'ADD a/b/' log.mddiff | wc -l` 200 "not 200 mails"
mdiff --exclude "*/b/*" -v a
assert `grep 'ADD a/b/' log.mddiff | wc -l` 0 "not 0 mails"