#!/bin/sh # Test astring handling. # For now only in LIST response. # Gmail encodes all mailbox names in quotes and embedded quotes like "foo \" bar" # Panda encodes them using literals. if test -z "$MH_OBJ_DIR"; then srcdir=`dirname "$0"`/../.. MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR fi # TODO no need for xoauth in this test . "${srcdir}/test/oauth/common.sh" # common.sh sets this to something crazy; did i do that?! testname=${0#$srcdir/} # coverage notes # ( # set -ex # . ~/.cargo/env # covdir="$builddir/test/covdata/${MH_COVERAGE_PROFILE:-default}/test/cargo" # install -d "$covdir" # export LLVM_PROFILE_FILE="$covdir/%m-%p.profraw" # export CARGO_TARGET_DIR=$builddir/target # export RUSTC_BOOTSTRAP=1 # export RUSTFLAGS="-Zinstrument-coverage" # cargo t -- --test-threads=1 # make cargo # MH_IMAP_TEST_SERVER=panda make check 'TESTS=test/imap/test-astring' # ) #grcov .o/clang10 -s . --binary-path .o/clang10/target/debug/ -t html --branch --ignore-not-existing -o /coverage/default > covlog 2>&1 setup_test_without_data Mail setup_service fake_creds <> "$MH" <> "$MH" echo "imap-log-$MH_TEST_IMAP_LOG_LEVEL-to: $MH_TEST_DIR/Mail/imap.d/log.$MH_TEST_IMAP_LOG_LEVEL" >> "$MH" fi # Test astring and nstring handling with some faked up but legal responses. # I don't know whether any implementations return nil or quoted in these FETCH # respones, but it is legal, so it's a fair test. # TODO removed nstring testing for now cat > "$imapd" <