Command line tests

NB : this file is auto generated by the Makefile, do not modify!

This test check that illegal command lines cause archicheck to exit with a non null return code.  Note that normal use is overly tested in other tests, so here mainly error situations are tested.  Note also that quiet and verbose mode (-q / -v) are also tested in other test.

Tests

Help options

Test that the -h, --help or no command line will put :

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt

Version option

Test that the --version will put :

ArchiCheck version 0.2

-I option without src dir

Error : Sources directory expected after -I

-I option with an unknow dir

Error : No qsdqjh directory

unknown -xyz option

Error : Unknown rules file or unknow option -xzy

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt

I option with... nothing do do

(no rules file, no -ld or -lf, etc.)

Error : No src found in those directories

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt

I option with... nothing do do and an unknown directory

Error : No dir2 directory

-lc option without rules file

Error : Cannot list components, no rules file given

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt

Legal line, but no src file in the given (existing) directory

Error : Cannot list files, no sources found to analyze

file given to -I, instead of a directory

Error : src.adb is not a directory

-ld given, but no source found

Error : Cannot list dependencies, no sources found

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt

src found, but nothing to do whith it

Error : Nothing to do with those sources

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt

rules file found, but nothing to do whith it

Error : Nothing to do with this rules file

ArchiCheck normal use :
   archicheck rules_file -I directory [-I directory]*

General form :
   archicheck [Options] [rules_file] [-I directory]*

Options :
   -lf | --list_files        : list sources files analyzed
   -ld | --list_dependencies : list identified dependencies in analyzed sources files
   -lc | --list_components   : list components described in a rules file
         --version           : archicheck version
   -q  | --quiet             : no message unless error. Warning are also ignored.
   -v  | --verbose
   -h  | --help              : this message

Examples:
   archicheck rules.txt -I ./src
   archicheck -lf -I ./src
   archicheck -lc rules.txt