diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-05-24 18:16:27 +0800 |
---|---|---|
committer | Petteri Räty <petsku@petteriraty.eu> | 2011-05-24 17:36:23 +0300 |
commit | 7bd3431fd711c257cb5d1c756f21545e5cc3d5ad (patch) | |
tree | 5069be2ab509ef3d9a152e61ee2a5460e3ca1dfb /test | |
parent | Core: refactor bash_ast constructor (diff) | |
download | libbash-7bd3431fd711c257cb5d1c756f21545e5cc3d5ad.tar.gz libbash-7bd3431fd711c257cb5d1c756f21545e5cc3d5ad.tar.bz2 libbash-7bd3431fd711c257cb5d1c756f21545e5cc3d5ad.zip |
Core: improve error reporting
Now the script name, line number and char position will be printed
out when error occurs. This improvement doesn't cover all cases.
Diffstat (limited to 'test')
-rwxr-xr-x | test/verify_error_output_test.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/verify_error_output_test.sh b/test/verify_error_output_test.sh new file mode 100755 index 0000000..b3c2eed --- /dev/null +++ b/test/verify_error_output_test.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +illegal="${srcdir}/scripts/illegal_script.sh" +output=$(./variable_printer "$illegal" 2>&1) +[[ $output == "${illegal}(1) : error 5 : Unexpected token, at offset 3"* ]] |