SYNOPSIS

augparse [\s-1OPTIONS\s0] \s-1MODULE\s0

DESCRIPTION

Execute an Augeas module, most commonly to evaluate the tests it contains.

OPTIONS

-I, --include=\s-1DIR\s0

Add \s-1DIR\s0 to the module loadpath. Can be given multiple times. The directories set here are searched before any directories specified in the \s-1AUGEAS_LENS_LIB\s0 environment variable, and before the default directory /usr/share/augeas/lenses.

-t, --trace

Print a trace of the modules that are being loaded.

--nostdinc

Do not search any of the default directories for modules. When this option is set, only directories specified explicitly with -I or specified in \s-1AUGEAS_LENS_LIB\s0 will be searched for modules.

--notypecheck

Do not perform lens type checks. Only use this option during lens development and make sure you typecheck lenses when you are done developing - you should never use a lens that hasn't been typechecked. This option is sometimes useful when you are working on unit tests for a lens to speed up the time it takes to repeatedly run and fix tests.

--version

Print version information and exit.

-h

Display this help and exit

EXAMPLES

To run the tests in lenses/tests/test_foo.aug and use modules from the directory lenses, run

augparse -I lenses lenses/tests/test_foo.aug

TESTS

Tests can appear as top-level forms anywhere in a module. Generally, the tests for a module lenses/foo.aug are kept in a separate file, usually in lenses/tests/test_foo.aug.

There are two different kinds of tests that Augeas can run: get and put tests. The syntax for get tests is

test \s-1LENS\s0 get \s-1STRING\s0 = \s-1RESULT\s0

which applies the get direction of the lens \s-1LENS\s0 to \s-1STRING\s0 and compares it with the given \s-1RESULT\s0. \s-1RESULT\s0 can either be a tree literal, the symbol ? to print the result of applying \s-1LENS\s0 to \s-1STRING\s0, or the symbol * to indicate that the test should produce an exception.

The syntax for put tests is

test \s-1LENS\s0 put \s-1STRING\s0 after \s-1COMMANDS\s0 = \s-1RESULT\s0

which first applies the get direction of the lens \s-1LENS\s0 to \s-1STRING\s0, then applies the given \s-1COMMANDS\s0 to the resulting tree, and finally transforms the modified tree back to a string using the put direction of \s-1LENS\s0. The resulting string is then compared to \s-1RESULT\s0, which can be a string, the symbol ? to print the result of applying \s-1LENS\s0 to \s-1STRING\s0, or the symbol * to indicate that the test should produce an exception.

RELATED TO augparse…

Augeas project homepage <http://www.augeas.net/>

augtool