Server IP : 85.214.239.14 / Your IP : 3.144.15.34 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/share/augeas/lenses/dist/tests/ |
Upload File : |
module Test_properties = let conf = " # # Test tomcat properties file #tomcat.commented.value=1 # config tomcat.port = 8080 tomcat.application.name=testapp tomcat.application.description=my test application property.with_underscore=works empty.property= empty.property.withtrailingspaces= \n! more comments key: value key2:value2 key3 :value3 key4:=value4 key5\"=value5 key6/c=value6 long.description=this is a description that happens to span \ more than one line with a combination of tabs and \ spaces \ \nor not # comment break short.break = a\ b =empty_key =empty_key cheeses spaces only multi spaces indented spaces \= =A space and = equals space with \ multiline escaped\:colon=value escaped\=equals=value escaped\ space=value " (* Other tests that aren't supported yet overflow.description=\ just wanted to indent it *) let lns = Properties.lns test lns get conf = { } { } { "#comment" = "Test tomcat properties file" } { "#comment" = "tomcat.commented.value=1" } { "#comment" = "config" } { "tomcat.port" = "8080" } { "tomcat.application.name" = "testapp" } { "tomcat.application.description" = "my test application" } { "property.with_underscore" = "works" } { "empty.property" } { "empty.property.withtrailingspaces" } { "!comment" = "more comments" } { "key" = "value" } { "key2" = "value2" } { "key3" = "value3" } { "key4" = "=value4" } { "key5\"" = "value5" } { "key6/c" = "value6" } {} { "long.description" = " < multi > " { = "this is a description that happens to span " } { = "more than one line with a combination of tabs and " } { = "spaces " } { = "or not" } } {} { "#comment" = "comment break" } {} { "short.break" = " < multi > " { = "a" } { = "b" } } {} { = "empty_key" } { = "empty_key" } {} { "cheeses" } {} { "spaces" = "only" } { "multi" = "spaces" } { "indented" = "spaces" } {} { "\\=" = "A" } { "space" = "and = equals" } { "space" = " < multi > " { = "with " } { = "multiline" } } {} { "escaped\:colon" = "value" } { "escaped\=equals" = "value" } { "escaped\ space" = "value" } test lns put conf after set "tomcat.port" "99"; set "tomcat.application.host" "foo.network.com" = " # # Test tomcat properties file #tomcat.commented.value=1 # config tomcat.port = 99 tomcat.application.name=testapp tomcat.application.description=my test application property.with_underscore=works empty.property= empty.property.withtrailingspaces= \n! more comments key: value key2:value2 key3 :value3 key4:=value4 key5\"=value5 key6/c=value6 long.description=this is a description that happens to span \ more than one line with a combination of tabs and \ spaces \ \nor not # comment break short.break = a\ b =empty_key =empty_key cheeses spaces only multi spaces indented spaces \= =A space and = equals space with \ multiline escaped\:colon=value escaped\=equals=value escaped\ space=value tomcat.application.host=foo.network.com " (* GH issue #19: value on new line *) test lns get "k=\ b\ c\n" = { "k" = " < multi > " { } { = "b" } { = "c" } } test lns get "tomcat.util.scan.DefaultJarScanner.jarsToSkip=\ bootstrap.jar,commons-daemon.jar,tomcat-juli.jar\n" = { "tomcat.util.scan.DefaultJarScanner.jarsToSkip" = " < multi > " { } { = "bootstrap.jar,commons-daemon.jar,tomcat-juli.jar" } } test lns get "# comment\r\na.b=val\r\nx=\r\n" = { "#comment" = "comment" } { "a.b" = "val" } { "x" } test lns get "# \r\n! \r\n" = { } { }