HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/certbot/current/usr/share/augeas/lenses/dist/tests/test_simplelines.aug
(*
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" }