From be117f6875c46df2cf1c5e7210108d9a0634d7e1 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Thu, 23 May 2024 21:51:39 -0400 Subject: [PATCH] test for error in compartment synapses --- tests/0504_CompartmentSynapse/README.md | 7 +++++++ tests/0504_CompartmentSynapse/run.sh | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 tests/0504_CompartmentSynapse/README.md create mode 100755 tests/0504_CompartmentSynapse/run.sh diff --git a/tests/0504_CompartmentSynapse/README.md b/tests/0504_CompartmentSynapse/README.md new file mode 100644 index 0000000..7302bf4 --- /dev/null +++ b/tests/0504_CompartmentSynapse/README.md @@ -0,0 +1,7 @@ +# 0504_CompartmentSynapse + +attempting to create a set of compartments connected by chemical synapses + +## tests + +- 1D, 3 units, network, synaptic connection compartment ODE diff --git a/tests/0504_CompartmentSynapse/run.sh b/tests/0504_CompartmentSynapse/run.sh new file mode 100755 index 0000000..705a780 --- /dev/null +++ b/tests/0504_CompartmentSynapse/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# work out our folder name +test=${PWD##*/} # to assign to a variable +test=${test:-/} # to correct for the case where PWD=/ + +fail=0 + +# run sbmodelr +../../sbmodelr -s blob -n ../sources/1to2to3.gv ../sources/blob.cps 3 > output + +# check that the an error is issued +if ! grep -q "ERROR: blob is a compartment ODE, but compartments cannot have synaptic links" output; then + printf 'FAIL %s\n' "${test}" + let "fail = 1" +fi + +if [ "$fail" = 0 ] ; then + printf 'PASS %s\n' "${test}" + rm output +fi + +exit $fail