Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
test_expect_code 2 'test_when_finished "(exit 2)"'
EXPECTED=$NOTMUCH_SRCDIR/test/test.expected-output
test_expect_code 2 'test_when_finished "(exit 2)"'
EXPECTED=$NOTMUCH_SRCDIR/test/test.expected-output
sed -e 's/\(.*\-\-\- test-verbose\.4\.\expected\).*/\1/' \
-e 's/\(.*\+\+\+ test-verbose\.4\.\output\).*/\1/'
}
sed -e 's/\(.*\-\-\- test-verbose\.4\.\expected\).*/\1/' \
-e 's/\(.*\+\+\+ test-verbose\.4\.\output\).*/\1/'
}
# They happen to be in the mail directory already but that is okay
# since we do not call notmuch new hereafter.
# They happen to be in the mail directory already but that is okay
# since we do not call notmuch new hereafter.
generate_message \
"[subject]=\"insert-subject\"" \
"[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" \
generate_message \
"[subject]=\"insert-subject\"" \
"[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" \
. $(dirname "$0")/test-lib.sh || exit 1
. $(dirname "$0")/test-lib.sh || exit 1
mkdir -p ${MAIL_DIR}/cur
cat > ${MAIL_DIR}/cur/a <<EOF
Subject: First message
mkdir -p ${MAIL_DIR}/cur
cat > ${MAIL_DIR}/cur/a <<EOF
Subject: First message
mkdir -p ${MAIL_DIR}/cur
cat > ${MAIL_DIR}/cur/b <<EOF
Subject: Second message
mkdir -p ${MAIL_DIR}/cur
cat > ${MAIL_DIR}/cur/b <<EOF
Subject: Second message
test_begin_subtest "${3:-looking for $2 instance of '$1'}"
count=$(notmuch count --output=threads "$1")
test_expect_equal "$count" "$2"
}
test_begin_subtest "${3:-looking for $2 instance of '$1'}"
count=$(notmuch count --output=threads "$1")
test_expect_equal "$count" "$2"
}
test_begin_subtest "${2:-Expecting $1 thread(s)}"
count=$(notmuch count --output=threads)
test_expect_equal "$count" "$1"
}
test_begin_subtest "${2:-Expecting $1 thread(s)}"
count=$(notmuch count --output=threads)
test_expect_equal "$count" "$1"
}
test_begin_subtest "${2:-Expecting $1 ghosts(s)}"
ghosts=$($NOTMUCH_BUILDDIR/test/ghost-report ${MAIL_DIR}/.notmuch/xapian)
test_expect_equal "$ghosts" "$1"
test_begin_subtest "${2:-Expecting $1 ghosts(s)}"
ghosts=$($NOTMUCH_BUILDDIR/test/ghost-report ${MAIL_DIR}/.notmuch/xapian)
test_expect_equal "$ghosts" "$1"
export NOTMUCH_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)"
fi
export NOTMUCH_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)"
fi
sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/'
}
sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/'
}
-notmuch_passwd_sanitize()
+notmuch_passwd_sanitize ()
{
${NOTMUCH_PYTHON} -c'
import os, sys, pwd, socket
{
${NOTMUCH_PYTHON} -c'
import os, sys, pwd, socket
# - cmp's output is not nearly as easy to read as diff -u
# - not all diff versions understand "-u"
# - cmp's output is not nearly as easy to read as diff -u
# - not all diff versions understand "-u"
${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(notmuch-test-progn $*)"
}
${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(notmuch-test-progn $*)"
}
# Note: if there is need to print debug information from python program,
# use stdout = os.fdopen(6, 'w') or stderr = os.fdopen(7, 'w')
PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \
# Note: if there is need to print debug information from python program,
# use stdout = os.fdopen(6, 'w') or stderr = os.fdopen(7, 'w')
PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \