Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_ntpd.aug
1 (*
2 Module: Test_Ntpd
3   Provides unit tests for the <Ntpd> lens.
4 *)
5
6 module Test_ntpd =
7
8 test Ntpd.listen get "listen on *\n" =
9   { "listen on"
10     { "address" = "*" } }
11
12 test Ntpd.listen get "listen on 127.0.0.1\n" =
13   { "listen on"
14     { "address" = "127.0.0.1" } }
15
16 test Ntpd.listen get "listen on ::1\n" =
17   { "listen on"
18     { "address" = "::1" } }
19
20 test Ntpd.listen get "listen on ::1 rtable 4\n" =
21   { "listen on"
22     { "address" = "::1" }
23     { "rtable" = "4" } }
24
25 test Ntpd.server get "server ntp.example.org\n" =
26   { "server"
27     { "address" = "ntp.example.org" } }
28
29 test Ntpd.server get "server ntp.example.org rtable 42\n" =
30   { "server"
31     { "address" = "ntp.example.org" }
32     { "rtable" = "42" } }
33
34 test Ntpd.server get "server ntp.example.org weight 1 rtable 42\n" =
35   { "server"
36     { "address" = "ntp.example.org" }
37     { "weight" = "1" }
38     { "rtable" = "42" } }
39
40 test Ntpd.server get "server ntp.example.org weight 10\n" =
41   { "server"
42     { "address" = "ntp.example.org" }
43     { "weight" = "10" } }
44
45
46 test Ntpd.sensor get "sensor *\n" =
47   { "sensor"
48     { "device" = "*" } }
49
50 test Ntpd.sensor get "sensor nmea0\n" =
51   { "sensor"
52     { "device" = "nmea0" } }
53
54 test Ntpd.sensor get "sensor nmea0 correction 42\n" =
55   { "sensor"
56     { "device" = "nmea0" }
57     { "correction" = "42" } }
58
59 test Ntpd.sensor get "sensor nmea0 correction -42\n" =
60   { "sensor"
61     { "device" = "nmea0" }
62     { "correction" = "-42" } }
63
64 test Ntpd.sensor get "sensor nmea0 correction 42 weight 2\n" =
65   { "sensor"
66     { "device" = "nmea0" }
67     { "correction" = "42" }
68     { "weight" = "2" } }
69
70 test Ntpd.sensor get "sensor nmea0 correction 42 refid Puffy\n" =
71   { "sensor"
72     { "device" = "nmea0" }
73     { "correction" = "42" }
74     { "refid" = "Puffy" } }
75
76 test Ntpd.sensor get "sensor nmea0 correction 42 stratum 2\n" =
77   { "sensor"
78     { "device" = "nmea0" }
79     { "correction" = "42" }
80     { "stratum" = "2" } }