#!/bin/sh

mpull -t
assert $? 0 "failed mpull -t"
echo DEBUG=true >> target/.smd/config.default
echo 'EXCLUDE_REMOTE="Mail/foo%20%26%20bar"' >> target/.smd/config.default

mkdir -p 'Mail/foo & bar/'
cp -r Mail/cur 'Mail/foo & bar/'

mpull
assert $? 0 "failed mpull"

if [ -d 'target/Mail/foo & bar' ]; then
	assert 1 0 "EXCLUDE_REMOTE ignored"
fi

mpush
assert $? 0 "failed mpush"
mpull
assert $? 0 "failed mpull2"

if [ -d 'target/Mail/foo & bar' ]; then
	assert 1 0 "EXCLUDE_REMOTE ignored"
fi

