This file is indexed.

/usr/share/augeas/lenses/dist/tests/test_ethers.aug is in augeas-lenses 1.2.0-0ubuntu1.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(* Tests for the Ethers module *)

module Test_ethers =

(*
  let empty_entries = "# see man ethers for syntax\n"

  test Ethers.record get empty_entries =
    { "#comment" = "see man ethers for syntax" }
*)

  let three_entries = "54:52:00:01:00:01 192.168.1.1
# \tcomment\t
54:52:00:01:00:02 foo.example.com
00:16:3e:01:fe:03 bar
"

  test Ethers.lns get three_entries =
   { "1" { "mac" = "54:52:00:01:00:01" }
         { "ip" = "192.168.1.1" } }
   { "#comment" = "comment" }
   { "2" { "mac" = "54:52:00:01:00:02" }
         { "ip" = "foo.example.com" } }
   { "3" { "mac" = "00:16:3e:01:fe:03" }
         { "ip" = "bar" } }

  (* Deleting the 'ip' node violates the schema *)
  test Ethers.lns put three_entries after
      rm "/1/ip"
    = *

  test Ethers.lns put three_entries after
    set "/2/ip" "192.168.1.2" ;
    set "/3/ip" "baz"
  = "54:52:00:01:00:01 192.168.1.1
# \tcomment\t
54:52:00:01:00:02 192.168.1.2
00:16:3e:01:fe:03 baz
"

  test Ethers.lns put three_entries after
    rm "/3"
  = "54:52:00:01:00:01 192.168.1.1
# \tcomment\t
54:52:00:01:00:02 foo.example.com
"

  (* Make sure blank and indented lines get through *)
  test Ethers.lns get "54:52:00:01:00:01\tfoo  \n \n\n
54:52:00:01:00:02 bar\n" =
    { "1" { "mac" = "54:52:00:01:00:01" }
          { "ip" = "foo" } }
    {} {} {}
    { "2" { "mac" = "54:52:00:01:00:02" }
          { "ip" = "bar" } }

(* Local Variables: *)
(* mode: caml *)
(* End: *)