diff options
-rw-r--r-- | modules/sed/transform.c | 8 | ||||
-rw-r--r-- | tests/sed.at | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/modules/sed/transform.c b/modules/sed/transform.c index 67e0de8..ec7983f 100644 --- a/modules/sed/transform.c +++ b/modules/sed/transform.c | |||
@@ -628,6 +628,2 @@ _single_transform_name_to_slist (struct transform *tr, | |||
628 | 628 | ||
629 | if (rmp[0].rm_so) | ||
630 | if (transform_append (tr, slist, input, rmp[0].rm_so)) | ||
631 | return 1; | ||
632 | |||
633 | nmatches++; | 629 | nmatches++; |
@@ -641,2 +637,6 @@ _single_transform_name_to_slist (struct transform *tr, | |||
641 | 637 | ||
638 | if (rmp[0].rm_so) | ||
639 | if (transform_append (tr, slist, input, rmp[0].rm_so)) | ||
640 | return 1; | ||
641 | |||
642 | for (segm = tf->repl_head; segm; segm = segm->next) | 642 | for (segm = tf->repl_head; segm; segm = segm->next) |
diff --git a/tests/sed.at b/tests/sed.at index 0f432c5..39dd99d 100644 --- a/tests/sed.at +++ b/tests/sed.at | |||
@@ -11,2 +11,6 @@ database dequote sed 's/<(.*)>/\1/g' | |||
11 | database default sed 's/ok-(.*)/\1/' | 11 | database default sed 's/ok-(.*)/\1/' |
12 | database n sed 's/s/@/2' | ||
13 | database g sed 's/s/@/2g' | ||
14 | dispatch map eq n database n | ||
15 | dispatch map eq g database g | ||
12 | dispatch key like <*> transform key dequote | 16 | dispatch key like <*> transform key dequote |
@@ -14,3 +18,3 @@ dispatch default database default | |||
14 | ]) | 18 | ]) |
15 | AT_CHECK([smaptest -c smapd.conf test ok-word test word test '<ok-word>' | 19 | AT_CHECK([smaptest -c smapd.conf test ok-word test word test '<ok-word>' n password g passwords |
16 | ], | 20 | ], |
@@ -20,3 +24,6 @@ test word: NOTFOUND | |||
20 | test <ok-word>: OK word | 24 | test <ok-word>: OK word |
25 | n password: OK pas@word | ||
26 | g passwords: OK pas@word@ | ||
21 | ]) | 27 | ]) |
28 | |||
22 | AT_CLEANUP | 29 | AT_CLEANUP |