Sharp.Augeas/Sharp.Augeas.Test/lens/tests/test_simplelines.aug

43 lines
724 B
Plaintext
Raw Permalink Normal View History

2022-11-08 20:57:02 +03:00
(*
Module: Test_Simplelines
Provides unit tests and examples for the <Simplelines> lens.
*)
module Test_Simplelines =
(* Variable: conf *)
let conf = "# This is a comment
word
a line
indented line
with $péci@l cH@r2ct3rs
"
(* Test: Simplelines.lns *)
test Simplelines.lns get conf =
{ "#comment" = "This is a comment" }
{ }
{ "1" = "word" }
{ "2" = "a line" }
{ "3" = "indented line" }
{ "4" = "with $péci@l cH@r2ct3rs" }
(* Variable: cronallow *)
let cronallow = "# Test comment
#
user1
another
user2
"
(* Test: cron.allow file *)
test SimpleLines.lns get cronallow =
{ "#comment" = "Test comment" }
{ }
{ "1" = "user1" }
{ "2" = "another" }
{ }
{ "3" = "user2" }