/usr/share/augeas/lenses/dist/tests
NameSizeModeActions
test_access.aug35250644editdlrm
test_activemq_conf.aug7580644editdlrm
test_activemq_xml.aug16710644editdlrm
test_afs_cellalias.aug13390644editdlrm
test_aliases.aug30620644editdlrm
test_anaconda.aug21180644editdlrm
test_anacron.aug12350644editdlrm
test_approx.aug14750644editdlrm
test_aptcacherngsecurity.aug12020644editdlrm
test_aptconf.aug53880644editdlrm
test_aptpreferences.aug19020644editdlrm
test_aptsources.aug35050644editdlrm
test_apt_update_manager.aug11510644editdlrm
test_authinfo2.aug9910644editdlrm
test_authorized_keys.aug45770644editdlrm
test_authselectpam.aug13740644editdlrm
test_automaster.aug15640644editdlrm
test_automounter.aug53280644editdlrm
test_avahi.aug5450644editdlrm
test_backuppchosts.aug6230644editdlrm
test_bbhosts.aug37680644editdlrm
test_bootconf.aug9800644editdlrm
test_build.aug83190644editdlrm
test_cachefilesd.aug5790644editdlrm
test_carbon.aug26040644editdlrm
test_ceph.aug49730644editdlrm
test_cgconfig.aug60690644editdlrm
test_cgrules.aug9030644editdlrm
test_channels.aug48290644editdlrm
test_chrony.aug75630644editdlrm
test_clamav.aug86800644editdlrm
test_cmdline.aug10020644editdlrm
test_cobblermodules.aug6200644editdlrm
test_cobblersettings.aug13690644editdlrm
test_collectd.aug13320644editdlrm
test_cpanel.aug16540644editdlrm
test_cron.aug20050644editdlrm
test_cron_user.aug7790644editdlrm
test_crypttab.aug18180644editdlrm
test_csv.aug15940644editdlrm
test_cups.aug142630644editdlrm
test_cyrus_imapd.aug13600644editdlrm
test_darkice.aug5750644editdlrm
test_debctrl.aug142710644editdlrm
test_desktop.aug12610644editdlrm
test_devfsrules.aug22270644editdlrm
test_device_map.aug7970644editdlrm
test_dhclient.aug48050644editdlrm
test_dhcpd.aug154290644editdlrm
test_dnsmasq.aug12220644editdlrm
test_dns_zone.aug105810644editdlrm
test_dovecot.aug228310644editdlrm
test_dpkg.aug3220644editdlrm
test_dput.aug34550644editdlrm
test_erlang.aug26430644editdlrm
test_ethers.aug14360644editdlrm
test_exports.aug17310644editdlrm
test_fail2ban.aug4130644editdlrm
test_fai_diskconfig.aug153990644editdlrm
test_fonts.aug199200644editdlrm
test_fstab.aug45530644editdlrm
test_fuse.aug5900644editdlrm
test_gdm.aug6200644editdlrm
test_getcap.aug38580644editdlrm
test_group.aug11130644editdlrm
test_grub.aug109230644editdlrm
test_grubenv.aug24980644editdlrm
test_gshadow.aug3590644editdlrm
test_gtkbookmarks.aug8200644editdlrm
test_hostname.aug1030644editdlrm
test_hosts.aug18270644editdlrm
test_hosts_access.aug62690644editdlrm
test_host_conf.aug8340644editdlrm
test_htpasswd.aug4680644editdlrm
test_httpd.aug167090644editdlrm
test_inetd.aug46230644editdlrm
test_inifile.aug119160644editdlrm
test_inittab.aug18610644editdlrm
test_inputrc.aug52520644editdlrm
test_interfaces.aug37410644editdlrm
test_iproute2.aug9450644editdlrm
test_iptables.aug75690644editdlrm
test_iscsid.aug25110644editdlrm
test_jaas.aug54800644editdlrm
test_jettyrealm.aug9820644editdlrm
test_jmxaccess.aug6370644editdlrm
test_jmxpassword.aug6530644editdlrm
test_json.aug176730644editdlrm
test_kdump.aug29110644editdlrm
test_keepalived.aug146770644editdlrm
test_known_hosts.aug18340644editdlrm
test_koji.aug16900644editdlrm
test_krb5.aug306790644editdlrm
test_ldap.aug3980644editdlrm
test_ldif.aug39680644editdlrm
test_ldso.aug4860644editdlrm
test_lightdm.aug40720644editdlrm
test_limits.aug10690644editdlrm
test_login_defs.aug5280644editdlrm
test_logrotate.aug81410644editdlrm
test_logwatch.aug3220644editdlrm
test_lokkit.aug21470644editdlrm
test_lvm.aug46700644editdlrm
test_mailscanner.aug329200644editdlrm
test_mailscanner_rules.aug26640644editdlrm
test_masterpasswd.aug32830644editdlrm
test_mcollective.aug12260644editdlrm
test_mdadm_conf.aug25820644editdlrm
test_memcached.aug11770644editdlrm
test_mke2fs.aug31510644editdlrm
test_modprobe.aug41690644editdlrm
test_modules.aug2290644editdlrm
test_modules_conf.aug33050644editdlrm
test_mongodbserver.aug7750644editdlrm
test_monit.aug10540644editdlrm
test_multipath.aug66550644editdlrm
test_mysql.aug89580644editdlrm
test_nagioscfg.aug30250644editdlrm
test_nagiosobjects.aug17320644editdlrm
test_netmasks.aug6400644editdlrm
test_networkmanager.aug19720644editdlrm
test_networks.aug11890644editdlrm
test_nginx.aug78220644editdlrm
test_nrpe.aug21800644editdlrm
test_nslcd.aug131480644editdlrm
test_nsswitch.aug15730644editdlrm
test_ntp.aug52170644editdlrm
test_ntpd.aug19110644editdlrm
test_odbc.aug16590644editdlrm
test_opendkim.aug77560644editdlrm
test_openshift_config.aug37310644editdlrm
test_openshift_http.aug22070644editdlrm
test_openshift_quickstarts.aug127210644editdlrm
test_openvpn.aug287680644editdlrm
test_oz.aug6110644editdlrm
test_pagekite.aug28140644editdlrm
test_pam.aug21760644editdlrm
test_pamconf.aug10100644editdlrm
test_passwd.aug25010644editdlrm
test_pbuilder.aug5310644editdlrm
test_pgbouncer.aug20180644editdlrm
test_pg_hba.aug62430644editdlrm
test_php.aug14350644editdlrm
test_phpvars.aug16640644editdlrm
test_postfix_access.aug15600644editdlrm
test_postfix_main.aug10530644editdlrm
test_postfix_master.aug41970644editdlrm
test_postfix_passwordmap.aug13370644editdlrm
test_postfix_sasl_smtpd.aug5300644editdlrm
test_postfix_transport.aug17540644editdlrm
test_postfix_virtual.aug12620644editdlrm
test_postgresql.aug83780644editdlrm
test_properties.aug37040644editdlrm
test_protocols.aug13340644editdlrm
test_puppet.aug5470644editdlrm
test_puppetfile.aug45560644editdlrm
test_puppetfileserver.aug9490644editdlrm
test_puppet_auth.aug11290644editdlrm
test_pylonspaste.aug17690644editdlrm
test_pythonpaste.aug12550644editdlrm
test_qpid.aug13330644editdlrm
test_quote.aug88700644editdlrm
test_rabbitmq.aug37440644editdlrm
test_radicale.aug10620644editdlrm
test_rancid.aug7060644editdlrm
test_redis.aug88530644editdlrm
test_reprepro_uploaders.aug47910644editdlrm
test_resolv.aug15000644editdlrm
test_rhsm.aug45690644editdlrm
test_rmt.aug8260644editdlrm
test_rsyncd.aug13050644editdlrm
test_rsyslog.aug72250644editdlrm
test_rtadvd.aug8590644editdlrm
test_rx.aug42200644editdlrm
test_samba.aug36030644editdlrm
test_schroot.aug23070644editdlrm
test_securetty.aug6360644editdlrm
test_semanage.aug17500644editdlrm
test_services.aug29360644editdlrm
test_shadow.aug20560644editdlrm
test_shells.aug3480644editdlrm
test_shellvars.aug196070644editdlrm
test_shellvars_list.aug42840644editdlrm
test_simplelines.aug7240644editdlrm
test_simplevars.aug9940644editdlrm
test_sip_conf.aug36970644editdlrm
test_slapd.aug31000644editdlrm
test_smbusers.aug6640644editdlrm
test_solaris_system.aug25440644editdlrm
test_soma.aug4240644editdlrm
test_spacevars.aug4310644editdlrm
test_splunk.aug30340644editdlrm
test_squid.aug52170644editdlrm
test_ssh.aug34020644editdlrm
test_sshd.aug54260644editdlrm
test_sssd.aug8960644editdlrm
test_star.aug15950644editdlrm
test_strongswan.aug26330644editdlrm
test_stunnel.aug7910644editdlrm
test_subversion.aug31310644editdlrm
test_sudoers.aug109760644editdlrm
test_sysconfig.aug41990644editdlrm
test_sysconfig_route.aug5220644editdlrm
test_sysctl.aug13740644editdlrm
test_syslog.aug113140644editdlrm
test_systemd.aug84020644editdlrm
test_termcap.aug170910644editdlrm
test_thttpd.aug11950644editdlrm
test_tinc.aug7250644editdlrm
test_tmpfiles.aug106020644editdlrm
test_toml.aug83440644editdlrm
test_trapperkeeper.aug42460644editdlrm
test_tuned.aug2590644editdlrm
test_up2date.aug63840644editdlrm
test_updatedb.aug8550644editdlrm
test_util.aug4280644editdlrm
test_vfstab.aug28620644editdlrm
test_vmware_config.aug17380644editdlrm
test_vsftpd.aug25500644editdlrm
test_webmin.aug1950644editdlrm
test_wine.aug57160644editdlrm
test_xendconfsxp.aug79260644editdlrm
test_xinetd.aug28420644editdlrm
test_xml.aug205240644editdlrm
test_xorg.aug25680644editdlrm
test_xymon.aug43970644editdlrm
test_xymon_alerting.aug76210644editdlrm
test_yaml.aug13720644editdlrm
test_yum.aug74500644editdlrm
Edit: /usr/share/augeas/lenses/dist/tests/test_inifile.aug (11916B)
(* Module: Test_IniFile Provides unit tests and examples for the module. About: Tests to run The tests are run with all combinations of the following three parameters: > separator : (a) default (/[:=]/ "=") ; (b) "=" "=" > comment : (c) default (/[;#]/ ";") ; (d) ";" ";" > empty lines : (e) default ; (f) noempty *) module Test_IniFile = (* ALL TESTS TO RUN *) (* Group: TEST a/c/e *) (* Variable: comment_ace *) let comment_ace = IniFile.comment IniFile.comment_re IniFile.comment_default (* Variable: sep_ace *) let sep_ace = IniFile.sep IniFile.sep_re IniFile.sep_default (* Variable: entry_ace *) let entry_ace = IniFile.entry IniFile.entry_re sep_ace comment_ace (* Variable: title_ace *) let title_ace = IniFile.title IniFile.record_re (* Variable: record_ace *) let record_ace = IniFile.record title_ace entry_ace (* Variable: lns_ace *) let lns_ace = IniFile.lns record_ace comment_ace (* Variable: conf_ace *) let conf_ace = "# comment with sharp [section1] test_ace = value # end of line comment test_ace = test_ace = \"value with spaces\" ; comment with colon " (* Test: lns_ace Testing the a/c/e combination *) test lns_ace get conf_ace = { "#comment" = "comment with sharp" } {} { "section1" { "test_ace" = "value" { "#comment" = "end of line comment" } } { "test_ace" } { "test_ace" = "value with spaces" } { "#comment" = "comment with colon" } {} } test lns_ace put conf_ace after set "section1/foo" "yes" = "# comment with sharp [section1] test_ace = value # end of line comment test_ace = test_ace = \"value with spaces\" ; comment with colon foo=yes " (* Test: lns_ace Quotes can appear within bare values *) test lns_ace get "[section]\ntest_ace = value \"with quotes\" inside\n" = { "section" { "test_ace" = "value \"with quotes\" inside" } } (* Group: TEST a/c/f *) (* Variable: comment_acf *) let comment_acf = IniFile.comment IniFile.comment_re IniFile.comment_default (* Variable: sep_acf *) let sep_acf = IniFile.sep IniFile.sep_re IniFile.sep_default (* Variable: entry_acf *) let entry_acf = IniFile.entry IniFile.entry_re sep_acf comment_acf (* Variable: title_acf *) let title_acf = IniFile.title IniFile.record_re (* Variable: record_acf *) let record_acf = IniFile.record_noempty title_acf entry_acf (* Variable: lns_acf *) let lns_acf = IniFile.lns_noempty record_acf comment_acf (* Variable: conf_acf *) let conf_acf = "# comment with sharp [section1] test_acf = value test_acf = test_acf : value2 # end of line comment ; comment with colon " (* Test: lns_acf Testing the a/c/f combination *) test lns_acf get conf_acf = { "#comment" = "comment with sharp" } { "section1" { "test_acf" = "value" } { "test_acf" } { "test_acf" = "value2" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } } (* Group: TEST a/d/e *) (* Variable: comment_ade *) let comment_ade = IniFile.comment ";" ";" (* Variable: sep_ade *) let sep_ade = IniFile.sep IniFile.sep_re IniFile.sep_default (* Variable: entry_ade *) let entry_ade = IniFile.entry IniFile.entry_re sep_ade comment_ade (* Variable: title_ade *) let title_ade = IniFile.title IniFile.record_re (* Variable: record_ade *) let record_ade = IniFile.record title_ade entry_ade (* Variable: lns_ade *) let lns_ade = IniFile.lns record_ade comment_ade (* Variable: conf_ade *) let conf_ade = "; a first comment with colon [section1] test_ade = value test_ade : value2 ; end of line comment ; comment with colon test_ade = " (* Test: lns_ade Testing the a/d/e combination *) test lns_ade get conf_ade = { "#comment" = "a first comment with colon" } { "section1" { "test_ade" = "value" } { "test_ade" = "value2" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } {} { "test_ade" } } (* Group: TEST a/d/f *) (* Variable: comment_adf *) let comment_adf = IniFile.comment ";" ";" (* Variable: sep_adf *) let sep_adf = IniFile.sep IniFile.sep_re IniFile.sep_default (* Variable: entry_adf *) let entry_adf = IniFile.entry IniFile.entry_re sep_adf comment_adf (* Variable: title_adf *) let title_adf = IniFile.title IniFile.record_re (* Variable: record_adf *) let record_adf = IniFile.record_noempty title_adf entry_adf (* Variable: lns_adf *) let lns_adf = IniFile.lns_noempty record_adf comment_adf (* Variable: conf_adf *) let conf_adf = "; a first comment with colon [section1] test_adf = value test_adf : value2 ; end of line comment ; comment with colon test_adf = " (* Test: lns_adf Testing the a/d/f combination *) test lns_adf get conf_adf = { "#comment" = "a first comment with colon" } { "section1" { "test_adf" = "value" } { "test_adf" = "value2" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } { "test_adf" } } (* Group: TEST b/c/e *) (* Variable: comment_bce *) let comment_bce = IniFile.comment IniFile.comment_re IniFile.comment_default (* Variable: sep_bce *) let sep_bce = IniFile.sep "=" "=" (* Variable: entry_bce *) let entry_bce = IniFile.entry IniFile.entry_re sep_bce comment_bce (* Variable: title_bce *) let title_bce = IniFile.title IniFile.record_re (* Variable: record_bce *) let record_bce = IniFile.record title_bce entry_bce (* Variable: lns_bce *) let lns_bce = IniFile.lns record_bce comment_bce (* Variable: conf_bce *) let conf_bce = "# comment with sharp [section1] test_bce = value # end of line comment ; comment with colon test_bce = " (* Test: lns_bce Testing the b/c/e combination *) test lns_bce get conf_bce = { "#comment" = "comment with sharp" } {} { "section1" { "test_bce" = "value" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } {} { "test_bce" } } (* Group: TEST b/c/f *) (* Variable: comment_bcf *) let comment_bcf = IniFile.comment IniFile.comment_re IniFile.comment_default (* Variable: sep_bcf *) let sep_bcf = IniFile.sep "=" "=" (* Variable: entry_bcf *) let entry_bcf = IniFile.entry IniFile.entry_re sep_bcf comment_bcf (* Variable: title_bcf *) let title_bcf = IniFile.title IniFile.record_re (* Variable: record_bcf *) let record_bcf = IniFile.record_noempty title_bce entry_bcf (* Variable: lns_bcf *) let lns_bcf = IniFile.lns_noempty record_bce comment_bcf (* Variable: conf_bcf *) let conf_bcf = "# conf with sharp [section1] test_bcf = value # end of line comment ; comment with colon test_bcf = " (* Test: lns_bcf Testing the b/c/f combination *) test lns_bcf get conf_bcf = { "#comment" = "conf with sharp" } { "section1" { "test_bcf" = "value" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } { "test_bcf" } } (* Group: TEST b/d/e *) (* Variable: comment_bde *) let comment_bde = IniFile.comment ";" ";" (* Variable: sep_bde *) let sep_bde = IniFile.sep "=" "=" (* Variable: entry_bde *) let entry_bde = IniFile.entry IniFile.entry_re sep_bde comment_bde (* Variable: title_bde *) let title_bde = IniFile.title IniFile.record_re (* Variable: record_bde *) let record_bde = IniFile.record title_bde entry_bde (* Variable: lns_bde *) let lns_bde = IniFile.lns record_bde comment_bde (* Variable: conf_bde *) let conf_bde = "; first comment with colon [section1] test_bde = value ; end of line comment ; comment with colon test_bde = " (* Test: lns_bde Testing the b/d/e combination *) test lns_bde get conf_bde = { "#comment" = "first comment with colon" } {} { "section1" { "test_bde" = "value" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } {} { "test_bde" } } (* Group: TEST b/d/f *) (* Variable: comment_bdf *) let comment_bdf = IniFile.comment ";" ";" (* Variable: sep_bdf *) let sep_bdf = IniFile.sep "=" "=" (* Variable: entry_bdf *) let entry_bdf = IniFile.entry IniFile.entry_re sep_bdf comment_bdf (* Variable: title_bdf *) let title_bdf = IniFile.title IniFile.record_re (* Variable: record_bdf *) let record_bdf = IniFile.record_noempty title_bdf entry_bdf (* Variable: lns_bdf *) let lns_bdf = IniFile.lns_noempty record_bdf comment_bdf (* Variable: conf_bdf *) let conf_bdf = "; first comment with colon [section1] test_bdf = value ; end of line comment ; comment with colon test_bdf = " (* Test: lns_bdf Testing the b/d/f combination *) test lns_bdf get conf_bdf = { "#comment" = "first comment with colon" } { "section1" { "test_bdf" = "value" { "#comment" = "end of line comment" } } { "#comment" = "comment with colon" } { "test_bdf" } } (* Group: TEST multiline values *) (* Variable: multiline_test *) let multiline_test = "test_ace = val1\n val2\n val3\n" (* Variable: multiline_nl *) let multiline_nl = "test_ace =\n val2\n val3\n" (* Variable: multiline_ace *) let multiline_ace = IniFile.entry_multiline IniFile.entry_re sep_ace comment_ace (* Test: multiline_ace Testing the a/c/e combination with a multiline entry *) test multiline_ace get multiline_test = { "test_ace" = "val1\n val2\n val3" } (* Test: multiline_nl Multiline values can begin with a single newline *) test multiline_ace get multiline_nl = { "test_ace" = "\n val2\n val3" } (* Test: lns_ace Ticket #243 *) test lns_ace get "[section1] ticket_243 = \"value1;value2#value3\" # end of line comment " = { "section1" { "ticket_243" = "value1;value2#value3" { "#comment" = "end of line comment" } } } (* Group: TEST list entries *) (* Variable: list_test *) let list_test = "test_ace = val1,val2,val3 # a comment\n" (* Lens: list_ace *) let list_ace = IniFile.entry_list IniFile.entry_re sep_ace RX.word Sep.comma comment_ace (* Test: list_ace Testing the a/c/e combination with a list entry *) test list_ace get list_test = { "test_ace" { "1" = "val1" } { "2" = "val2" } { "3" = "val3" } { "#comment" = "a comment" } } (* Variable: list_nocomment_test *) let list_nocomment_test = "test_ace = val1,val2,val3 \n" (* Lens: list_nocomment_ace *) let list_nocomment_ace = IniFile.entry_list_nocomment IniFile.entry_re sep_ace RX.word Sep.comma (* Test: list_nocomment_ace Testing the a/c/e combination with a list entry without end-of-line comment *) test list_nocomment_ace get list_nocomment_test = { "test_ace" { "1" = "val1" } { "2" = "val2" } { "3" = "val3" } } (* Test: IniFile.lns_loose *) test IniFile.lns_loose get conf_ace = { "section" = ".anon" { "#comment" = "comment with sharp" } { } } { "section" = "section1" { "test_ace" = "value" { "#comment" = "end of line comment" } } { "test_ace" } { "test_ace" = "value with spaces" } { "#comment" = "comment with colon" } { } } (* Test: IniFile.lns_loose_multiline *) test IniFile.lns_loose_multiline get conf_ace = { "section" = ".anon" { "#comment" = "comment with sharp" } { } } { "section" = "section1" { "test_ace" = "value" { "#comment" = "end of line comment" } } { "test_ace" } { "test_ace" = "value with spaces" } { "#comment" = "comment with colon" } { } } test IniFile.lns_loose_multiline get multiline_test = { "section" = ".anon" { "test_ace" = "val1\n val2\n val3" } }