blaze822: blaze822_addr: don't force add space before quoted words

pull/173/head
Leah Neukirchen 4 years ago
parent 8c8a4bd422
commit 3370fd5f70

@ -277,8 +277,6 @@ blaze822_addr(char *s, char **dispo, char **addro)
if (memchr(tok, '@', c - tok))
not_addr = 1; // @ inside "" is never an addr
if (tc != ttok)
tc += safe_append_space(ttok, sizeof ttok);
tc += safe_append(ttok, sizeof ttok, tok, c);
} else if (*s == '(') {
char *z = skip_comment(s);

@ -1,7 +1,7 @@
#!/bin/sh
cd ${0%/*}
. ./lib.sh
plan 27
plan 31
check_addr() {
printf "From: %s\n" "$1" | check_test "parse $1" = "$2" "maddr /dev/stdin"
@ -41,3 +41,8 @@ check_addr 'foo@[::1] (ipv6)' 'ipv6 <foo@[::1]>'
check_addr '<Foo Bar <foobar@qux.com>' 'foobar@qux.com'
check_addr '"abc@def"@ghi' ''
check_addr '"foo@" <bar.com foo@bar.com>' '"foo@" <bar.comfoo@bar.com>'
check_addr 'test."test"@example.org' 'test.test@example.org'
check_addr '<test."test"@example.org>' 'test.test@example.org'
check_addr 'test"test"@example.org' 'testtest@example.org'
check_addr '<test"test"@example.org>' 'testtest@example.org'

Loading…
Cancel
Save