Use \n instead of \r\n as line separator
This commit is contained in:
parent
b33a1c7526
commit
5ece6956cf
20
doc/main.txt
20
doc/main.txt
@ -1,10 +1,10 @@
|
|||||||
Bash-completion
|
Bash-completion
|
||||||
===============
|
===============
|
||||||
Freddy Vulto (FVu)
|
Freddy Vulto (FVu)
|
||||||
v1.0, Mar 2009
|
v1.0, Mar 2009
|
||||||
|
|
||||||
// include::intro.txt[]
|
// include::intro.txt[]
|
||||||
// include::bash_completion.txt[]
|
// include::bash_completion.txt[]
|
||||||
|
|
||||||
include::styleguide.txt[]
|
include::styleguide.txt[]
|
||||||
include::testing.txt[]
|
include::testing.txt[]
|
||||||
|
302
doc/main.xml
302
doc/main.xml
@ -1,151 +1,151 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<book lang="en">
|
<book lang="en">
|
||||||
<bookinfo>
|
<bookinfo>
|
||||||
<title>Bash-completion</title>
|
<title>Bash-completion</title>
|
||||||
<date>Mar 2009</date>
|
<date>Mar 2009</date>
|
||||||
<author>
|
<author>
|
||||||
<firstname>Freddy</firstname>
|
<firstname>Freddy</firstname>
|
||||||
<othername>Vulto</othername>
|
<othername>Vulto</othername>
|
||||||
<surname>(FVu)</surname>
|
<surname>(FVu)</surname>
|
||||||
</author>
|
</author>
|
||||||
<authorinitials>FV(</authorinitials>
|
<authorinitials>FV(</authorinitials>
|
||||||
|
|
||||||
<revhistory><revision><revnumber>1.0</revnumber><date>Mar 2009</date><authorinitials>FV(</authorinitials></revision></revhistory>
|
<revhistory><revision><revnumber>1.0</revnumber><date>Mar 2009</date><authorinitials>FV(</authorinitials></revision></revhistory>
|
||||||
|
|
||||||
</bookinfo>
|
</bookinfo>
|
||||||
<preface>
|
<preface>
|
||||||
<title>Preface</title>
|
<title>Preface</title>
|
||||||
</preface>
|
</preface>
|
||||||
<part id="_coding_style_guide">
|
<part id="_coding_style_guide">
|
||||||
<title>Coding Style Guide</title>
|
<title>Coding Style Guide</title>
|
||||||
<simpara>This document attempts to explain the basic styles and patterns that are used in the bash completion. New code should try to conform to these standards so that it is as easy to maintain as existing code. Of course every rule has an exception, but it's important to know the rules nonetheless!</simpara>
|
<simpara>This document attempts to explain the basic styles and patterns that are used in the bash completion. New code should try to conform to these standards so that it is as easy to maintain as existing code. Of course every rule has an exception, but it's important to know the rules nonetheless!</simpara>
|
||||||
|
|
||||||
<simpara>This is particularly directed at people new to the bash completion codebase, who are in the process of getting their code reviewed. Before getting a review, please read over this document and make sure your code conforms to the recommendations here.</simpara>
|
<simpara>This is particularly directed at people new to the bash completion codebase, who are in the process of getting their code reviewed. Before getting a review, please read over this document and make sure your code conforms to the recommendations here.</simpara>
|
||||||
|
|
||||||
</part>
|
</part>
|
||||||
<part id="_automated_testing">
|
<part id="_automated_testing">
|
||||||
<title>Automated testing</title>
|
<title>Automated testing</title>
|
||||||
<chapter id="_introduction">
|
<chapter id="_introduction">
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
<simpara>The bash-completion package contains an automated test suite. Running the tests should help verifying that bash-completion works as expected. The tests are also very helpful in uncovering software regressions at an early stage.</simpara>
|
<simpara>The bash-completion package contains an automated test suite. Running the tests should help verifying that bash-completion works as expected. The tests are also very helpful in uncovering software regressions at an early stage.</simpara>
|
||||||
|
|
||||||
<simpara>The bash-completion test suite is written on top of the <ulink url="http://www.gnu.org/software/dejagnu/">DejaGnu</ulink> testing framework. DejaGnu is written in <ulink url="http://expect.nist.gov">Expect</ulink>, which in turn uses <ulink url="http://tcl.sourceforge.net">Tcl</ulink> — Tool command language.</simpara>
|
<simpara>The bash-completion test suite is written on top of the <ulink url="http://www.gnu.org/software/dejagnu/">DejaGnu</ulink> testing framework. DejaGnu is written in <ulink url="http://expect.nist.gov">Expect</ulink>, which in turn uses <ulink url="http://tcl.sourceforge.net">Tcl</ulink> — Tool command language.</simpara>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="_installing_dejagnu">
|
<chapter id="_installing_dejagnu">
|
||||||
<title>Installing DejaGnu</title>
|
<title>Installing DejaGnu</title>
|
||||||
<simpara>Installing DejaGnu should be easy using your local package manager.</simpara>
|
<simpara>Installing DejaGnu should be easy using your local package manager.</simpara>
|
||||||
|
|
||||||
<section id="_debian_ubuntu">
|
<section id="_debian_ubuntu">
|
||||||
<title>Debian/Ubuntu</title>
|
<title>Debian/Ubuntu</title>
|
||||||
<simpara>On Debian/Ubuntu you can use <literal>apt-get</literal>:</simpara>
|
<simpara>On Debian/Ubuntu you can use <literal>apt-get</literal>:</simpara>
|
||||||
|
|
||||||
<screen>sudo apt-get install dejagnu</screen>
|
<screen>sudo apt-get install dejagnu</screen>
|
||||||
<simpara>This should also install the necessary <literal>expect</literal> and <literal>tcl</literal> packages.</simpara>
|
<simpara>This should also install the necessary <literal>expect</literal> and <literal>tcl</literal> packages.</simpara>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="_structure">
|
<chapter id="_structure">
|
||||||
<title>Structure</title>
|
<title>Structure</title>
|
||||||
<section id="_main_areas_dejagnu_tools">
|
<section id="_main_areas_dejagnu_tools">
|
||||||
<title>Main areas (DejaGnu tools)</title>
|
<title>Main areas (DejaGnu tools)</title>
|
||||||
<simpara>The tests are grouped into different areas, called <emphasis>tool</emphasis> in DejaGnu:</simpara>
|
<simpara>The tests are grouped into different areas, called <emphasis>tool</emphasis> in DejaGnu:</simpara>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<emphasis role="strong">install</emphasis>
|
<emphasis role="strong">install</emphasis>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<simpara>
|
<simpara>
|
||||||
Functional tests for installation and caching of the main bash-completion package.
|
Functional tests for installation and caching of the main bash-completion package.
|
||||||
</simpara>
|
</simpara>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<emphasis role="strong">completion</emphasis>
|
<emphasis role="strong">completion</emphasis>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<simpara>
|
<simpara>
|
||||||
Functional tests per completion.
|
Functional tests per completion.
|
||||||
</simpara>
|
</simpara>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<emphasis role="strong">unit</emphasis>
|
<emphasis role="strong">unit</emphasis>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<simpara>
|
<simpara>
|
||||||
Unit tests for bash-completion helper functions.
|
Unit tests for bash-completion helper functions.
|
||||||
</simpara>
|
</simpara>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</section>
|
</section>
|
||||||
<section id="_running_the_tests">
|
<section id="_running_the_tests">
|
||||||
<title>Running the tests</title>
|
<title>Running the tests</title>
|
||||||
<simpara>The tests are run by calling <literal>runtest</literal> in the test directory:</simpara>
|
<simpara>The tests are run by calling <literal>runtest</literal> in the test directory:</simpara>
|
||||||
|
|
||||||
<screen>runtest --outdir=log --tool completion
|
<screen>runtest --outdir=log --tool completion
|
||||||
runtest --outdir=log --tool install
|
runtest --outdir=log --tool install
|
||||||
runtest --outdir=log --tool unit</screen>
|
runtest --outdir=log --tool unit</screen>
|
||||||
<simpara>The commands above are already wrapped up in shell scripts within the <literal>test</literal> directory:</simpara>
|
<simpara>The commands above are already wrapped up in shell scripts within the <literal>test</literal> directory:</simpara>
|
||||||
|
|
||||||
<screen>./runCompletion
|
<screen>./runCompletion
|
||||||
./runInstall
|
./runInstall
|
||||||
./runUnit</screen>
|
./runUnit</screen>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="_maintenance">
|
<chapter id="_maintenance">
|
||||||
<title>Maintenance</title>
|
<title>Maintenance</title>
|
||||||
<section id="_adding_a_completion_test">
|
<section id="_adding_a_completion_test">
|
||||||
<title>Adding a completion test</title>
|
<title>Adding a completion test</title>
|
||||||
<simpara>You can add script/generate to add a test.</simpara>
|
<simpara>You can add script/generate to add a test.</simpara>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="_rationale">
|
<chapter id="_rationale">
|
||||||
<title>Rationale</title>
|
<title>Rationale</title>
|
||||||
<section id="_naming_conventions">
|
<section id="_naming_conventions">
|
||||||
<title>Naming conventions</title>
|
<title>Naming conventions</title>
|
||||||
<section id="_test_suite_or_testsuite">
|
<section id="_test_suite_or_testsuite">
|
||||||
<title>Test suite or testsuite</title>
|
<title>Test suite or testsuite</title>
|
||||||
<simpara>The primary Wikipedia page is called
|
<simpara>The primary Wikipedia page is called
|
||||||
<ulink url="http://en.wikipedia.org/wiki/Test_suite">test suite</ulink> and not testsuite, so that's what this
|
<ulink url="http://en.wikipedia.org/wiki/Test_suite">test suite</ulink> and not testsuite, so that's what this
|
||||||
document sticks to.</simpara>
|
document sticks to.</simpara>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<section id="_script_generate">
|
<section id="_script_generate">
|
||||||
<title>script/generate</title>
|
<title>script/generate</title>
|
||||||
<simpara>The name and location of this code generation script come from Ruby on Rails' <ulink url="http://en.wikibooks.org/wiki/Ruby_on_Rails/Tools/Generators">script/generate</ulink>.</simpara>
|
<simpara>The name and location of this code generation script come from Ruby on Rails' <ulink url="http://en.wikibooks.org/wiki/Ruby_on_Rails/Tools/Generators">script/generate</ulink>.</simpara>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="_reference">
|
<chapter id="_reference">
|
||||||
<title>Reference</title>
|
<title>Reference</title>
|
||||||
<simpara>Within test scripts the following library functions can be used:</simpara>
|
<simpara>Within test scripts the following library functions can be used:</simpara>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
<chapter id="_the_test_environment">
|
<chapter id="_the_test_environment">
|
||||||
<title>The test environment</title>
|
<title>The test environment</title>
|
||||||
<simpara>The tests run in a specially prepared bash environment. The following files are used:
|
<simpara>The tests run in a specially prepared bash environment. The following files are used:
|
||||||
<emphasis role="strong"> bashrch
|
<emphasis role="strong"> bashrch
|
||||||
</emphasis> inputrc
|
</emphasis> inputrc
|
||||||
* fixtures</simpara>
|
* fixtures</simpara>
|
||||||
|
|
||||||
<section id="_bashrc">
|
<section id="_bashrc">
|
||||||
<title>bashrc</title>
|
<title>bashrc</title>
|
||||||
<simpara>Contents of bashrc:</simpara>
|
<simpara>Contents of bashrc:</simpara>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
</part>
|
</part>
|
||||||
<index id="_index">
|
<index id="_index">
|
||||||
<title>Index</title>
|
<title>Index</title>
|
||||||
</index>
|
</index>
|
||||||
</book>
|
</book>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user