nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated


From: David Levine
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. fd250083492420769109b2d07790e8c695a2e2ed
Date: Thu, 23 Feb 2012 04:23:14 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, master has been updated
       via  fd250083492420769109b2d07790e8c695a2e2ed (commit)
       via  3597ba0ceeb7390c5bee21feda22101d86d64b2f (commit)
      from  a4999fa48c92214848cc5d792d1d6a35e3a189bb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=fd250083492420769109b2d07790e8c695a2e2ed


commit fd250083492420769109b2d07790e8c695a2e2ed
Author: David Levine <address@hidden>
Date:   Wed Feb 22 22:23:05 2012 -0600

    Added test-flist and test-mark sequences tests.

diff --git a/Makefile.am b/Makefile.am
index 3b6b84a..e86320e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,6 +50,7 @@ TESTS = test/bad-input/test-header test/folder/test-create \
        test/mhshow/test-cte-binary test/mhshow/test-qp \
        test/mhshow/test-subpart test/new/test-basic test/pick/test-stderr \
        test/repl/test-if-str test/scan/test-scan \
+       test/sequences/test-flist test/sequences/test-mark \
        test/whatnow/test-attach-detach test/whatnow/test-cd \
        test/whatnow/test-ls \
        test/cleanup ## The "cleanup" test should always be last.
diff --git a/test/sequences/test-flist b/test/sequences/test-flist
new file mode 100755
index 0000000..b897037
--- /dev/null
+++ b/test/sequences/test-flist
@@ -0,0 +1,79 @@
+#!/bin/sh
+######################################################
+#
+# Test flist
+#
+######################################################
+
+set -e
+
+if test -z "${MH_OBJ_DIR}"; then
+    srcdir=`dirname $0`/../..
+    MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
+fi
+
+. "$MH_OBJ_DIR/test/common.sh"
+
+setup_test
+
+run_test 'mark 1 3 5 7 9 +inbox -sequence odd' ''
+run_test 'mark -s odd -list' 'odd: 1 3 5 7 9'
+run_test 'mark +inbox -sequence unseen all' ''
+run_test 'mark +inbox -sequence unseen -list' 'unseen: 1-10'
+
+folder -create +other > /dev/null
+for i in 2 5 7 12; do
+  cp -p "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/other/$i"
+done
+run_test 'mark +other -sequence unseen all' ''
+run_test 'mark +other -sequence unseen -list' 'unseen: 2 5 7 12'
+
+# Make sure that inbox is current folder.
+folder -f +inbox > /dev/null
+
+# Test flists.
+run_test 'flists -seq odd' 'inbox+ has 5 in sequence odd; out of 10
+other  has 0 in sequence odd; out of  4'
+
+run_test 'flists -seq unseen' \
+         'inbox+ has 10 in sequence unseen; out of 10
+other  has  4 in sequence unseen; out of  4'
+
+# Test flist on individual folders, starting with the current folder.
+run_test 'flist -sequence unseen' \
+         'inbox+ has 10 in sequence unseen; out of 10'
+run_test 'flist +other -sequence unseen' \
+         'other+ has 4 in sequence unseen; out of 4'
+
+# Test multiple folders and sequences.
+run_test 'flist +inbox +other -seq unseen -seq odd' \
+         'inbox  has 10 in sequence unseen; out of 10
+inbox  has  5 in sequence odd   ; out of 10
+other+ has  4 in sequence unseen; out of  4
+other+ has  0 in sequence odd   ; out of  4'
+
+# Test Flist-Order with -noalpha.
+echo 'Flist-Order: o* i*' >> $MH_TEST_DIR/Mail/.mh_profile
+run_test 'flists -seq unseen -seq odd -noalpha' \
+         'other+ has  4 in sequence unseen; out of  4
+other+ has  0 in sequence odd   ; out of  4
+inbox  has 10 in sequence unseen; out of 10
+inbox  has  5 in sequence odd   ; out of 10'
+
+# Test nonexistent folder.
+run_test 'flist +nonexistent -seq unseen' ''
+
+# Test nonexistent sequence.
+run_test 'flist +inbox -seq nonexistent' \
+         'inbox+ has 0 in sequence nonexistent; out of 10'
+
+# Test -fast.
+folder -f +inbox > /dev/null
+run_test 'flist -sequence unseen -fast' 'inbox'
+run_test 'flist +other -sequence unseen -fast' 'other'
+
+# Test -fast and -alpha.
+run_test 'flists -seq unseen -fast -alpha' 'inbox
+other'
+
+exit $failed
diff --git a/test/sequences/test-mark b/test/sequences/test-mark
new file mode 100755
index 0000000..96a7e3d
--- /dev/null
+++ b/test/sequences/test-mark
@@ -0,0 +1,83 @@
+#!/bin/sh
+######################################################
+#
+# Test mark
+#
+######################################################
+
+set -e
+
+if test -z "${MH_OBJ_DIR}"; then
+    srcdir=`dirname $0`/../..
+    MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
+fi
+
+. "$MH_OBJ_DIR/test/common.sh"
+
+setup_test
+
+# Test sequence creation.
+run_test 'mark 1 3 5 7 +inbox -sequence odd' ''
+run_test 'mark 2 4 6 8 10 +inbox -sequence even' ''
+run_test 'mark +inbox -seq odd -seq even -list' \
+         'odd: 1 3 5 7
+even: 2 4 6 8 10'
+
+# Test add.
+run_test 'mark 9 -sequence odd -add -nozero' ''
+run_test 'mark -seq odd -list' 'odd: 1 3 5 7 9'
+
+# Test delete.
+run_test 'mark 9 -sequence odd -delete' ''
+run_test 'mark -seq odd -list' 'odd: 1 3 5 7'
+
+# Test that -nozero is default
+run_test 'mark 9 -sequence odd -add' ''
+run_test 'mark -seq odd -list' 'odd: 1 3 5 7 9'
+
+# Test -zero
+run_test 'mark 10 -s even -add -zero' ''
+run_test 'mark -s even -list' 'even: 10'
+
+# Test add prior to last message;
+run_test 'mark 8 -s even -add' ''
+run_test 'mark -s even -list' 'even: 8 10'
+
+# Test list.
+run_test 'mark -s odd -list' 'odd: 1 3 5 7 9'
+
+# Try to mark message that doesn't exist.
+run_test 'mark 12' "mark: message 12 doesn't exist"
+
+# Try to mark nonexistent folder.
+run_test 'mark +nonexistent' \
+         "mark: unable to change directory to `mhpath +`/nonexistent: \
+No such file or directory"
+
+# Test private sequence creation.
+# Set current message for following tests.
+folder +inbox 1 > /dev/null
+run_test 'mark 1 -sequence privateseq -add -nopublic' ''
+run_test 'mark -list' 'cur: 1
+odd: 1 3 5 7 9
+even: 8 10
+privateseq (private): 1'
+
+# Test add to private sequence.
+run_test 'mark 2 -sequence privateseq -add -nopublic' ''
+run_test 'mark -list' 'cur: 1
+odd: 1 3 5 7 9
+even: 8 10
+privateseq (private): 1-2'
+
+# Test private sequence list.
+run_test 'mark -sequence privateseq -list' 'privateseq (private): 1-2'
+
+# Test private sequence list with -public, which is apparently ignored.
+run_test 'mark -sequence privateseq -list -public' 'privateseq (private): 1-2'
+
+# Test mark on empty folder.
+folder -create +other > /dev/null
+run_test 'mark +other -sequence unseen all' 'mark: no messages in other'
+
+exit $failed

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3597ba0ceeb7390c5bee21feda22101d86d64b2f


commit 3597ba0ceeb7390c5bee21feda22101d86d64b2f
Author: David Levine <address@hidden>
Date:   Wed Feb 22 22:21:56 2012 -0600

    Don't list _sysconfdir/ directory in RPM spec.  We don't list any other 
directories, so now it will be created with the same permissions as all of the 
others.

diff --git a/nmh.spec b/nmh.spec
index 213abc6..08a0b91 100644
--- a/nmh.spec
+++ b/nmh.spec
@@ -13,6 +13,7 @@
 #    For example:
 #      $ rpm -i nmh-1.4-0.fc16.src.rpm
 #      $ rpmbuild --rmsource --rmspec \
+#          --define '_sysconfdir /usr/local/nmh/etc' \
 #          --define 'configure_opts --with-cyrus-sasl --with-locking=fcntl' \
 #          --bb ~/lib/rpmbuild/SPECS/nmh.spec
 #
@@ -109,4 +110,4 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%buildsubdir
 
 %files -f nmh_files
 %defattr(-,root,root,-)
-%config(noreplace) %_sysconfdir/
+%config(noreplace) %_sysconfdir/*

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am               |    1 +
 nmh.spec                  |    3 +-
 test/sequences/test-flist |   79 ++++++++++++++++++++++++++++++++++++++++++
 test/sequences/test-mark  |   83 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 165 insertions(+), 1 deletions(-)
 create mode 100755 test/sequences/test-flist
 create mode 100755 test/sequences/test-mark


hooks/post-receive
-- 
The nmh Mail Handling System



reply via email to

[Prev in Thread] Current Thread [Next in Thread]