3 augparse - execute an Augeas module
7 augparse [OPTIONS] MODULE
11 Execute an Augeas module, most commonly to evaluate the tests it contains.
17 =item B<-I>, B<--include>=I<DIR>
19 Add DIR to the module loadpath. Can be given multiple times. The
20 directories set here are searched before any directories specified in the
21 AUGEAS_LENS_LIB environment variable, and before the default directory
22 F</usr/share/augeas/lenses>.
24 =item B<-t>, B<--trace>
26 Print a trace of the modules that are being loaded.
30 Do not search any of the default directories for modules. When this option
31 is set, only directories specified explicitly with B<-I> or specified in
32 B<AUGEAS_LENS_LIB> will be searched for modules.
34 =item B<--notypecheck>
36 Do not perform lens type checks. Only use this option during lens
37 development and make sure you typecheck lenses when you are done developing
38 - you should never use a lens that hasn't been typechecked. This option is
39 sometimes useful when you are working on unit tests for a lens to speed up
40 the time it takes to repeatedly run and fix tests.
44 Print version information and exit.
48 Display this help and exit
54 To run the tests in F<lenses/tests/test_foo.aug> and use modules from the
55 directory F<lenses>, run
59 augparse -I lenses lenses/tests/test_foo.aug
65 Tests can appear as top-level forms anywhere in a module. Generally, the
66 tests for a module F<lenses/foo.aug> are kept in a separate file, usually
67 in F<lenses/tests/test_foo.aug>.
69 There are two different kinds of tests that Augeas can run: B<get> and
70 B<put> tests. The syntax for B<get> tests is
74 test LENS get STRING = RESULT
78 which applies the I<get> direction of the lens LENS to STRING and compares
79 it with the given RESULT. RESULT can either be a tree literal, the symbol
80 B<?> to print the result of applying LENS to STRING, or the symbol B<*> to
81 indicate that the test should produce an exception.
83 The syntax for B<put> tests is
87 test LENS put STRING after COMMANDS = RESULT
91 which first applies the I<get> direction of the lens LENS to STRING, then
92 applies the given COMMANDS to the resulting tree, and finally transforms
93 the modified tree back to a string using the I<put> direction of LENS. The
94 resulting string is then compared to RESULT, which can be a string, the
95 symbol B<?> to print the result of applying LENS to STRING, or the symbol
96 B<*> to indicate that the test should produce an exception.
100 David Lutterkort <lutter@watzmann.net>
102 =head1 COPYRIGHT AND LICENSE
104 Copyright 2007-2016 David Lutterkort
106 Augeas (and augparse) are distributed under the GNU Lesser General Public
111 B<Augeas> project homepage L<http://www.augeas.net/>