/usr/share/augeas/lenses/dist/tests/test_erlang.aug is in augeas-lenses 1.2.0-0ubuntu1.
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | (*
Module: Test_Erlang
Provides unit tests and examples for the <Erlang> lens.
*)
module Test_Erlang =
(* Group: comments *)
test Erlang.comment get "% This is a comment\n" =
{ "#comment" = "This is a comment" }
(* Group: simple values *)
let value_bare = Erlang.value Rx.word Erlang.bare
test value_bare get "{foo, bar}" = { "foo" = "bar" }
let value_decimal = Erlang.value Rx.word Erlang.decimal
test value_bare get "{foo, 0.25}" = { "foo" = "0.25" }
let value_quoted = Erlang.value Rx.word Erlang.quoted
test value_quoted get "{foo, '0.25'}" = { "foo" = "0.25" }
let value_glob = Erlang.value Rx.word Erlang.glob
test value_glob get "{foo, <<\".*\">>}" = { "foo" = ".*" }
let value_boolean = Erlang.value Rx.word Erlang.boolean
test value_boolean get "{foo, false}" = { "foo" = "false" }
(* Group: list values *)
let list_bare = Erlang.value_list Rx.word Erlang.bare
test list_bare get "{foo, [bar, baz]}" =
{ "foo"
{ "value" = "bar" }
{ "value" = "baz" } }
(* Group: tuple values *)
let tuple_bare = Erlang.tuple Erlang.bare Erlang.bare
test tuple_bare get "{foo, bar}" =
{ "tuple"
{ "value" = "foo" }
{ "value" = "bar" } }
(* Group: application *)
let list_bare_app = Erlang.application Rx.word list_bare
test list_bare_app get "{foo, [{bar, [baz, bat]}]}" =
{ "foo"
{ "bar"
{ "value" = "baz" }
{ "value" = "bat" } } }
(* Group: config *)
let list_bare_config = Erlang.config list_bare_app
test list_bare_config get "[
{foo, [{bar, [baz, bat]}]},
{goo, [{gar, [gaz, gat]}]}
].\n" =
{ "foo"
{ "bar"
{ "value" = "baz" }
{ "value" = "bat" } } }
{ "goo"
{ "gar"
{ "value" = "gaz" }
{ "value" = "gat" } } }
|