Test case for #399

issue480
Marius Kintel 2013-06-25 23:17:51 -04:00
parent a3cd019494
commit d9b3f7b52b
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,27 @@
function foo() = search(undef,undef);
if (false && foo()) {
echo("Fail");
} else {
echo("Pass");
}
if (true || foo()) {
echo("Pass");
} else {
echo("Fail");
}
if (true && true) {
echo("Pass");
}
if (false || true) {
echo("Pass");
}
function ternarytest() = true ? true : foo();
if (ternarytest()) {
echo("Pass");
}

View File

@ -779,7 +779,8 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES}
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/value-reassignment-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/value-reassignment-tests2.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/variable-scope-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/lookup-tests.scad)
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/lookup-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/expression-shortcircuit-tests.scad)
list(APPEND DUMPTEST_FILES ${FEATURES_FILES} ${EXAMPLE_FILES})
list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad

View File

@ -0,0 +1,5 @@
ECHO: "Pass"
ECHO: "Pass"
ECHO: "Pass"
ECHO: "Pass"
ECHO: "Pass"