3 Provides unit tests for the <Ntpd> lens.
8 test Ntpd.listen get "listen on *\n" =
12 test Ntpd.listen get "listen on 127.0.0.1\n" =
14 { "address" = "127.0.0.1" } }
16 test Ntpd.listen get "listen on ::1\n" =
18 { "address" = "::1" } }
20 test Ntpd.listen get "listen on ::1 rtable 4\n" =
25 test Ntpd.server get "server ntp.example.org\n" =
27 { "address" = "ntp.example.org" } }
29 test Ntpd.server get "server ntp.example.org rtable 42\n" =
31 { "address" = "ntp.example.org" }
34 test Ntpd.server get "server ntp.example.org weight 1 rtable 42\n" =
36 { "address" = "ntp.example.org" }
40 test Ntpd.server get "server ntp.example.org weight 10\n" =
42 { "address" = "ntp.example.org" }
46 test Ntpd.sensor get "sensor *\n" =
50 test Ntpd.sensor get "sensor nmea0\n" =
52 { "device" = "nmea0" } }
54 test Ntpd.sensor get "sensor nmea0 correction 42\n" =
56 { "device" = "nmea0" }
57 { "correction" = "42" } }
59 test Ntpd.sensor get "sensor nmea0 correction -42\n" =
61 { "device" = "nmea0" }
62 { "correction" = "-42" } }
64 test Ntpd.sensor get "sensor nmea0 correction 42 weight 2\n" =
66 { "device" = "nmea0" }
67 { "correction" = "42" }
70 test Ntpd.sensor get "sensor nmea0 correction 42 refid Puffy\n" =
72 { "device" = "nmea0" }
73 { "correction" = "42" }
74 { "refid" = "Puffy" } }
76 test Ntpd.sensor get "sensor nmea0 correction 42 stratum 2\n" =
78 { "device" = "nmea0" }
79 { "correction" = "42" }