1module Test_resolv =
2
3   let conf = "# Sample resolv.conf
4; With multiple comment styles
5nameserver 192.168.0.3  # and EOL comments
6nameserver ff02::1
7domain mynet.com  # and EOL comments
8search mynet.com anotherorg.net
9
10# A sortlist now
11sortlist 130.155.160.0/255.255.240.0 130.155.0.0
12
13options ndots:3 debug timeout:2
14options no-ip6-dotint single-request-reopen # and EOL comments
15
16lookup file bind
17family inet6 inet4
18"
19
20test Resolv.lns get conf =
21   { "#comment" = "Sample resolv.conf" }
22   { "#comment" = "With multiple comment styles" }
23   { "nameserver" = "192.168.0.3"
24        { "#comment" = "and EOL comments" } }
25   { "nameserver" = "ff02::1" }
26   { "domain" = "mynet.com"
27        { "#comment" = "and EOL comments" } }
28   { "search"
29        { "domain" = "mynet.com" }
30        { "domain" = "anotherorg.net" } }
31   {}
32   { "#comment" = "A sortlist now" }
33   { "sortlist"
34        { "ipaddr" = "130.155.160.0"
35           { "netmask" = "255.255.240.0" } }
36        { "ipaddr" = "130.155.0.0" } }
37   {}
38   { "options"
39        { "ndots" = "3" }
40        { "debug" }
41        { "timeout" = "2" } }
42   { "options"
43        { "ip6-dotint"
44             { "negate" } }
45	{ "single-request-reopen" }
46        { "#comment" = "and EOL comments" } }
47   {}
48   { "lookup"
49        { "file" }
50        { "bind" } }
51   { "family"
52        { "inet6" }
53        { "inet4" } }
54
55test Resolv.ip6_dotint
56   put "ip6-dotint"
57   after set "/ip6-dotint/negate" "" = "no-ip6-dotint"
58
59test Resolv.lns get ";  \r\n; \t \n" = { } { }
60