File: test_postfix_canonical.aug

package info (click to toggle)
puppet-module-camptocamp-postfix 5.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 576 kB
  • sloc: ruby: 1,544; sh: 10; makefile: 4
file content (30 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(*
Module: Test_Postfix_Canonical
  Provides unit tests and examples for the <Postfix_Canonical> lens.
*)

module Test_Postfix_Canonical =

(* View: conf *)
let conf = "# a comment
user@domain.com @domain
@otherdomain  @otherotherdomain
someuser  Full.Some.User
anotheruser  another_user+mail=address@domain
"

(* Test: Postfix_Canonical.lns *)
test Postfix_Canonical.lns get conf =
  { "#comment" = "a comment" }
  { "pattern" = "user@domain.com"
    { "destination" = "@domain" }
  }
  { "pattern" = "@otherdomain"
    { "destination" = "@otherotherdomain" }
  }
  { "pattern" = "someuser"
    { "destination" = "Full.Some.User" }
  }
  { "pattern" = "anotheruser"
    { "destination" = "another_user+mail=address@domain" }
  }