3 Provides unit tests and examples for the <Protocols> lens.
6 module Test_Protocols =
9 let conf = "# Internet (IP) protocols
11 ip 0 IP # internet protocol, pseudo protocol number
12 #hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
13 icmp 1 ICMP # internet control message protocol
14 igmp 2 IGMP # Internet Group Management
15 tp++ 39 TP++ # TP++ Transport Protocol
16 a/n 107 A/N # Active Networks
19 (* Test: Protocols.lns *)
20 test Protocols.lns get conf =
21 { "#comment" = "Internet (IP) protocols" }
27 { "#comment" = "internet protocol, pseudo protocol number" }
29 { "#comment" = "hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]" }
31 { "protocol" = "icmp" }
34 { "#comment" = "internet control message protocol" }
37 { "protocol" = "igmp" }
40 { "#comment" = "Internet Group Management" }
43 { "protocol" = "tp++" }
46 { "#comment" = "TP++ Transport Protocol" }
49 { "protocol" = "a/n" }
52 { "#comment" = "Active Networks" }