Move the long option name enum from cl.h into main.c, because it is
[svn.git] / tools / hook-scripts / mailer / tests / mailer-t1.sh
blobfdcfa1cd8e4b09353f86dcd0d95cbed51412f298
1 #!/bin/sh
3 # mailer-t1.sh: test #1 for the mailer.py script
5 # This test generates "email" for each revision in the repository,
6 # concatenating them into one big blob, which is then compared against
7 # a known output.
9 # Note: mailer-tweak.py must have been run to make the test outputs
10 # consistent and reproducible
12 # USAGE: ./mailer-t1.sh REPOS MAILER-SCRIPT
15 if test "$#" != 2; then
16 echo "USAGE: ./mailer-t1.sh REPOS MAILER-SCRIPT"
17 exit 1
20 scripts="`dirname $0`"
21 scripts="`cd $scripts && pwd`"
23 glom=$scripts/mailer-t1.current
24 orig=$scripts/mailer-t1.output
25 conf=$scripts/mailer.conf
26 rm -f $glom
28 export TZ=GST
30 youngest="`svnlook youngest $1`"
31 for rev in `python -c "import string; print string.join(map(str, range(1,$youngest+1)))"`; do
32 $2 commit $1 $rev $conf >> $glom
33 done
35 echo "current mailer.py output in: $glom"
37 dos2unix $glom
39 echo diff -q $orig $glom
40 diff -q $orig $glom && echo "SUCCESS: no differences detected"