Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On debian 9 using lxterminal I had to modify lib/util/test.sh to make unit test work. #52

Open
constrict0r opened this issue Aug 1, 2018 · 0 comments

Comments

@constrict0r
Copy link

The test is the sample test on README.md:
#!/bin/bash
source "$( cd "${BASH_SOURCE[0]%/*}" && pwd )/lib/oo-bootstrap.sh"
import util/test UI/Color
it 'should make a number and change its value'
try
integer aNumber=10
aNumber=12
test $aNumber == 12
expectPass

When the test is runned the next error is shown:
UI.Color.Red: order not found
UI.Color.Default: order not found

The problem happens on line 70 of test.sh:
alias caught="echo "CAUGHT: $(UI.Color.Red)$BACKTRACE_COMMAND$(UI.Color.Default) in $BACKTRACE_SOURCE:$BACKTRACE_LINE""

Why it did as a workaround was to put the aliases on the same file just above the conflicting line:
alias UI.Color.Default="echo"
alias UI.Color.Red="echo"
alias describe='Test NewGroup'
alias summary='Test DisplaySummary'
alias caught="echo "CAUGHT: $(UI.Color.Red)$BACKTRACE_COMMAND$(UI.Color.Default) in $BACKTRACE_SOURCE:$BACKTRACE_LINE""

And all work.

The lxterminal I'm using uses 8 colors:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant