Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / tests / test_php.aug
1 module Test_php =
2
3 let conf = "
4 safe_mode = Off
5 [PHP]
6 ; Enable the PHP scripting language engine under Apache.
7 engine = On
8
9 ; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
10 zend.ze1_compatibility_mode = Off
11  unserialize_callback_func=
12 date.default_latitude = 31.7667
13
14 [sqlite]
15 sqlite.assoc_case = 0
16 "
17
18
19 test PHP.lns get conf =
20   { ".anon"
21      {}
22      { "safe_mode" = "Off" } }
23   { "PHP"
24      { "#comment" = "Enable the PHP scripting language engine under Apache." }
25      { "engine"  = "On" }
26      {}
27      { "#comment" = "Enable compatibility mode with Zend Engine 1 (PHP 4.x)" }
28      { "zend.ze1_compatibility_mode" = "Off" }
29      { "unserialize_callback_func" }
30      { "date.default_latitude" = "31.7667" }
31      {} }
32   { "sqlite"
33      { "sqlite.assoc_case" = "0" } }
34
35 test PHP.lns put conf after rm "noop" = conf
36
37
38 test PHP.lns get ";\n" = { ".anon" {} }
39
40 (* Section titles can have spaces *)
41 test PHP.lns get "[mail function]\n" =  { "mail function" }
42
43 (* Keys can be lower and upper case *)
44 test PHP.lns get "[fake]
45 SMTP = localhost
46 mixed_KEY = 25
47 " = 
48  { "fake"
49      { "SMTP" = "localhost" }
50      { "mixed_KEY" = "25" } }
51
52 (* Ticket #243 *)
53 test PHP.lns get "session.save_path = \"3;/var/lib/php5\"\n" =
54    { ".anon"
55       { "session.save_path" = "3;/var/lib/php5" } }
56
57 (* GH issue #35
58    php-fpm syntax *)
59 test PHP.lns get "php_admin_flag[log_errors] = on\n" =
60    { ".anon"
61      { "php_admin_flag[log_errors]" = "on" } }