X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT170-sexp.sh;h=c3dcf52a8294d542a80b4dfbdd922095091fd73f;hb=75bdce79527571c12c5de0c630747d6262b73fbd;hp=db142e49683d2279f845b8aa6a3351f1b1d79a60;hpb=ca4852649ede6618046c1b38698af99f72063ecd;p=notmuch diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh index db142e49..c3dcf52a 100755 --- a/test/T170-sexp.sh +++ b/test/T170-sexp.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="--format=sexp output" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 test_begin_subtest "Show message: sexp" add_message "[subject]=\"sexp-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"sexp-show-message\"" @@ -37,13 +37,13 @@ id="sexp-show-inline-attachment-filename@notmuchmail.org" emacs_fcc_message \ "$subject" \ 'This is a test message with inline attachment with a filename' \ - "(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\") + "(mml-attach-file \"$NOTMUCH_SRCDIR/test/README\" nil nil \"inline\") (message-goto-eoh) (insert \"Message-ID: <$id>\n\")" output=$(notmuch show --format=sexp "id:$id") filename=$(notmuch search --output=files "id:$id") # Get length of README after base64-encoding, minus additional newline. -attachment_length=$(( $(base64 $TEST_DIRECTORY/README | wc -c) - 1 )) +attachment_length=$(( $(base64 $NOTMUCH_SRCDIR/test/README | wc -c) - 1 )) test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename (\"$filename\") :timestamp 946728000 :date_relative \"2000-01-01\" :tags (\"inbox\") :headers (:Subject \"sexp-show-inline-attachment-filename\" :From \"Notmuch Test Suite \" :To \"test_suite@notmuchmail.org\" :Date \"Sat, 01 Jan 2000 12:00:00 +0000\") :body ((:id 1 :content-type \"multipart/mixed\" :content ((:id 2 :content-type \"text/plain\" :content \"This is a test message with inline attachment with a filename\") (:id 3 :content-type \"application/octet-stream\" :content-disposition \"inline\" :filename \"README\" :content-transfer-encoding \"base64\" :content-length $attachment_length))))) ())))" test_done