aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Test: move test_coverage.sh to test/Mu Qiao2011-08-041-0/+35
|
* Builtin: reimplement the local built-inMu Qiao2011-08-021-1/+1
| | | | | | | Now the local built-in is not handled only in parser grammar so that expansions can happen for the arguments. '=' is not checked in the local and export built-in anymore because we do not generate empty AST for "export foo".
* Parser: support empty command with redirectionMu Qiao2011-08-021-1/+1
| | | | | | Now only '>' is supported because there would be a lot of conflicts if we want to fully support this. Also the operator other than '>' doesn't make sense.
* Core: raise exception when using local outside functionMu Qiao2011-08-021-0/+17
|
* Parser: allow braces in command argumentsMu Qiao2011-08-021-2/+1
|
* Parser: remove global backtrackingMu Qiao2011-07-202-2/+3
| | | | | | | Now several tests are not working: var_expansion.bash, isolated_functions.bash, compound_command.bash, test_expr.bash, test/ast_printer_test.sh, and test/verify_bashs_test.sh. We will fix them in later commits.
* Parser: handle command substitution in lexer rulesMu Qiao2011-07-201-1/+1
| | | | | | | | Inside command substitution, many characters are allowed. For example, MY_PV="$(replace_version_separator 1 '')" will reserve the single quotes for command substitution. Now we support this by handling command substitution in the lexer rules and call back to parser in walker grammar.
* Build: use bash to verify test scriptsMu Qiao2011-07-183-14/+24
| | | | | We keep the old style for some tests that behave differently depending on different bash versions.
* Parser: reduce backtracking for command_atomMu Qiao2011-07-061-1/+1
| | | | | Backtracking is reduced by left refactoring function definition and bash command.
* Utility: improve token printingMu Qiao2011-06-261-0/+4
| | | | | Now the ast_printer -t will print out the tokens if the file can be lexed properly (previously it required the file to be parsed properly).
* Merge branch 'mu/native_code'Mu Qiao2011-06-262-2/+5
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile.am bashast/features_script/features.sh.ast bashast/gunit/simp_command.gunit scripts/command_execution.bash test/verify_error_output_test.sh
| * Parser: use lexer rule to parse singled quoted stringMu Qiao2011-06-251-1/+1
| |
| * Parser: support '#' in double quoted stringMu Qiao2011-06-251-1/+1
| |
| * Parser: first support for here documentMu Qiao2011-06-252-1/+4
| | | | | | | | | | Currently the grammar doesn't allow any white space between the command and the here document due to backtracking.
| * Parser: support writing C++ code in the grammarMu Qiao2011-06-212-3/+3
| |
* | Merge remote-tracking branch 'mu/fix_arithmetic'Petteri Räty2011-06-251-0/+4
|\ \
| * | Utility: support printing tokens received by walkerMu Qiao2011-06-221-0/+4
| | | | | | | | | | | | | | | It's helpful if ast_printer can print tokens received by walker grammar. Now this is supported with the -w option.
* | | Core: improve current exception usageMu Qiao2011-06-222-8/+8
| | |
* | | Walker: first support for brace expansionMu Qiao2011-06-211-0/+10
|/ / | | | | | | | | We only support brace expansion in raw string for now. Other cases will cause an interpreter_exception.
* | Test: verify_error_output_test.sh improvementPetteri Räty2011-06-181-1/+1
| | | | | | | | | | | | The file now needs to be changes less often as it doesn't depend on exact line numbers any more. This should make it easier to merge branches.
* | Parser: support regular expression in keyword testMu Qiao2011-06-161-1/+1
|/
* Core: add namespace for interpreter_exceptionMu Qiao2011-06-142-7/+7
| | | | | The interpreter_exception is part of our public API so we put it under libbash namespace.
* Parser: Support redirection for all kinds of commandsMu Qiao2011-06-141-1/+1
| | | | | | | Bash allows redirection to appear after any kind of command including compound command. Now the parser grammar is changed to reflect this. Note that we do not support redirection for commands other than simple built-in execution so the walker grammar is not changed.
* Walker: support array offset expansionMu Qiao2011-06-111-1/+4
| | | | | * is removed from var_name as most expansions don't support it. Parser grammar is adjusted to generate better AST.
* Test: silent the error output of gtestMu Qiao2011-06-091-0/+4
|
* Core: make error handling POSIX compliantMu Qiao2011-06-031-9/+8
| | | | | | For a non-interactive shell, an error condition encountered by a special built-in or other type of utility shall cause the shell to write a diagnostic message to standard error and exit.
* Coding standard: git log for author informationMu Qiao2011-06-025-5/+0
| | | | | The author information can be found from git so just refer people from that.
* Parser: support nested function definitionsMu Qiao2011-06-011-1/+1
|
* Test: improve test coverage for public APIMu Qiao2011-05-261-0/+5
|
* Walker: throw exception if extglob used when disabledMu Qiao2011-05-251-0/+17
|
* Test: /bin/bash instead of /bin/shPetteri Räty2011-05-241-1/+1
| | | | verify_bash_test.sh uses bash syntax so it must be run with bash.
* Core: improve error reportingMu Qiao2011-05-241-0/+5
| | | | | Now the script name, line number and char position will be printed out when error occurs. This improvement doesn't cover all cases.
* Core: support special variable $0Mu Qiao2011-05-241-0/+3
|
* API: allow sourcing a script before interpretingMu Qiao2011-05-231-0/+18
|
* Build: compile lexer and parser as CPetteri Räty2011-05-131-1/+1
| | | | | | Now instead of compiling everything as C++ the lexer and parser are compiled as C. This means that user supplied CFLAGS are not used for c++ code and the compiler can probably do a better job.
* Core&Utility: return non zero exit status on failureMu Qiao2011-05-132-2/+38
| | | | | The public API, ast_printer and bash_ast are refactored to return non zero exit status on failure.
* Tests: fix cppunittestsMu Qiao2011-05-132-0/+66
| | | | | NULL is not allowed to initialize a string object. A common helper function is created to solve the problem.
* Builtin: implement inherit builtinMu Qiao2011-04-281-1/+1
| | | | | metadata_generator is improved to make use of the information added by inherit builtin.
* Core: use reference/pointer for the interpreter objectMu Qiao2011-04-281-9/+11
| | | | | | We don't share interpreter object and it's safer to use reference rather than shared_ptr. Raw pointer is used in the generated C source code.
* Merge remote-tracking branch 'mu/compound_expr'Petteri Räty2011-04-271-1/+1
|\
| * Walker: support special variables in var_refMu Qiao2011-04-261-1/+1
| | | | | | | | | | The syntax for special variables is now supported. Only $? has a runtime now.
* | Core: support DEFINED_PHASES for metadata generationMu Qiao2011-04-262-1/+13
|/ | | | | | We need to retrieve names of defined functions in order to generate DEFINED_PHASES. The public API is modified a bit to support it. A custom test is added for metadata generation.
* Test: rename *ebuild* to *bash*Mu Qiao2011-04-222-5/+5
| | | | | | The suffix is not proper when we want to distinguish normal shell scripts from ebuilds. So we rename these tests to make it possible to use metadata_generator as the compiler for *.ebuild.
* Walker: implement remove expansion for raw stringMu Qiao2011-04-201-1/+1
| | | | | | ${parameter#word}, ${parameter##word}, ${parameter%word}, ${parameter%%word} are supported for raw string. We haven't provided any advanced pattern matching yet.
* Build: separate utility programs from testsMu Qiao2011-04-202-238/+0
|
* Merge remote-tracking branch 'mu/master'Petteri Räty2011-04-142-1/+16
|\ | | | | | | | | Conflicts: src/core/interpreter.h
| * Support referring a whole arrayMu Qiao2011-04-141-0/+2
| | | | | | | | | | | | | | | | Syntax like ${array[@]} and ${array[*]} is supported now. Currently the only difference between the two is when they are used in a double quoted string, ${array[*]} will use the first character of IFS as delimiter rather than space. Rename some variables in test script for better ordering.
| * Raise exception if array index is less than 0Mu Qiao2011-04-141-0/+13
| | | | | | | | An interpreter_exception will be thrown if index is less than 0.
| * Support assigning empty value to variableMu Qiao2011-04-131-1/+1
| | | | | | | | Syntax like 'a=' and 'a[1]=' is supported now.
* | Spirit Qi implementation of parsing token filePetteri Räty2011-04-121-14/+35
|/ | | | | | With help from #boost migrated the custom parsing code to use qi. The grammar was adjusted to have UNDERSCORE token to avoid the token file having two entries for the same name.