c1a1e844bb
- Added kll file emitter * Re-constitutes KLL files from various stages of the compilation process - Using kll file emitter added a basic assignment expression unit test * Added unit test to travis - Fixed array assignment merging when using position operators * Required a special case merge - Update output templates for kiibohd
40 行
935 B
Bash
実行ファイル
40 行
935 B
Bash
実行ファイル
#!/bin/bash
|
|
# Use example .kll files to check basic kll processing
|
|
# Does a diff comparison with a pre-generated file for validation
|
|
# Jacob Alexander 2016
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Common functions
|
|
source ${SCRIPT_DIR}/common.bash
|
|
|
|
# Start in kll top-level directory
|
|
cd ${SCRIPT_DIR}/..
|
|
|
|
# Cleanup previously generated files
|
|
rm -rf ${SCRIPT_DIR}/generated
|
|
|
|
|
|
# Args used for each of the tests
|
|
ARGS="--emitter kll --target-dir ${SCRIPT_DIR}/generated"
|
|
FAIL_ARGS="--emitter kll --target-dir ${SCRIPT_DIR}/generated --token-debug --parser-token-debug --operation-organization-display --data-organization-display --data-finalization-display"
|
|
|
|
# Files to check syntax on
|
|
FILES=(
|
|
examples/assignment.kll
|
|
)
|
|
|
|
|
|
## Tests
|
|
|
|
|
|
cmds "./kll" "${ARGS}" "${FAIL_ARGS}" ${FILES[@]}
|
|
cmd diff --color=always ${SCRIPT_DIR}/cmp_assignment/final.kll ${SCRIPT_DIR}/generated/final.kll
|
|
|
|
|
|
## Tests complete
|
|
|
|
|
|
result
|
|
exit $?
|
|
|