# # File: test-Constraints.cbs # Author: Manfred Jeusfeld, Thomas Kuehne # Created: 2023-03-01 (2023-03-18/Manfred) # ----------------------------------------------------- # Call: cbshell -v test-Constraints.cbs # This script is self-sufficient. It first defines the multi-dimensional constructs # and then the integrity constraints and then tests the positive and negative examples. # Uses the public CBserver if local CBserver is not installed. # # connect startServer -t no -u nonpersistent -e -1 # cd oHome echo "Preparing oHome module ..." tellModel "00-oHome.sml.txt" showAnswer why mkdir MultiDim cd MultiDim echo "Preparing MultiDim module ..." tellModel "01-multidim-constructs.sml.txt" showAnswer why cd MultiDim echo "Adding constraints to MultiDim module ..." tellModel "01a-Constraints.sml.txt" showAnswer why cd MultiDim mkdir TestC2 cd TestC2 # should fail: tellModel c2-neg1.sml.txt showAnswer why # should not fail: tellModel c2-pos1.sml.txt showAnswer cd MultiDim mkdir TestC5 cd TestC5 # should fail: tellModel c5-neg1.sml.txt showAnswer why # should not fail: tellModel c5-pos1.sml.txt showAnswer