summaryrefslogtreecommitdiff
path: root/sieve
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-12-02 17:11:01 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-12-02 17:11:01 +0200
commit15f6dbf66eed6bed5c084d97077e7cc5f8e192a7 (patch)
tree1debcb9960f990af390cf3930c539736d0179960 /sieve
parented04bc837e353e61e4c43f6bdbd9a67859c61f61 (diff)
downloadmailutils-15f6dbf66eed6bed5c084d97077e7cc5f8e192a7.tar.gz
mailutils-15f6dbf66eed6bed5c084d97077e7cc5f8e192a7.tar.bz2
sieve: change string allocation and argument passing convention
Strings are allocated in a per-machine string space. String and argument lists form contiguous arrays of structures. Regular ex- pressions are compiled when they are needed. Compiled expressions are cached for eventual reuse.
Diffstat (limited to 'sieve')
-rw-r--r--sieve/tests/delheader.at2
-rw-r--r--sieve/tests/enc-char.at35
2 files changed, 18 insertions, 19 deletions
diff --git a/sieve/tests/delheader.at b/sieve/tests/delheader.at
index d068ce446..659d77ee9 100644
--- a/sieve/tests/delheader.at
+++ b/sieve/tests/delheader.at
@@ -125,7 +125,7 @@ Subject: Ping
Test message, please discard.
],
-[DELETEHEADER on msg uid 1: X-Agent: (regexp)
+[DELETEHEADER on msg uid 1: X-Agent (values)
])
m4_popdef([MUT_SIEVE_EXT_NAME])
diff --git a/sieve/tests/enc-char.at b/sieve/tests/enc-char.at
index 9d82525a6..d76c0c35a 100644
--- a/sieve/tests/enc-char.at
+++ b/sieve/tests/enc-char.at
@@ -19,7 +19,6 @@ AT_KEYWORDS([encoded-character enc-char])
AT_CHECK([
AT_DATA([prog],[[require ["reject", "encoded-character"];
-
reject "$${hex:40}";
reject "${hex: 40 }";
reject "${HEX: 40}";
@@ -38,25 +37,25 @@ reject "Nested ${hex: 73 65 71 ${hex: 75 65 6E}}ce";
reject "Invalid ${hex: 73 RE}";
]])
-sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -D prog | grep ACTION
+sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -D prog | sed -n 's/.*ACTION: //p'
],
[0],
-[ 9: ACTION: reject "$@"
- 16: ACTION: reject "@"
- 23: ACTION: reject "@"
- 30: ACTION: reject "${hex:40"
- 37: ACTION: reject "${hex:400}"
- 44: ACTION: reject "${hex:40}"
- 51: ACTION: reject "@"
- 58: ACTION: reject "${ unicode:40}"
- 65: ACTION: reject "@"
- 72: ACTION: reject "@"
- 79: ACTION: reject "@"
- 86: ACTION: reject "${Unicode:Cool}"
- 93: ACTION: reject "Now is the time"
- 100: ACTION: reject "Unbalanced ${hex: 73 65 71 uence"
- 107: ACTION: reject "Nested ${hex: 73 65 71 uen}ce"
- 114: ACTION: reject "Invalid ${hex: 73 RE}"
+[reject "$@"
+reject "@"
+reject "@"
+reject "${hex:40"
+reject "${hex:400}"
+reject "${hex:40}"
+reject "@"
+reject "${ unicode:40}"
+reject "@"
+reject "@"
+reject "@"
+reject "${Unicode:Cool}"
+reject "Now is the time"
+reject "Unbalanced ${hex: 73 65 71 uence"
+reject "Nested ${hex: 73 65 71 uen}ce"
+reject "Invalid ${hex: 73 RE}"
])
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.