diff --git a/test/usecases/verbatim/globals.mod b/test/usecases/verbatim/globals.mod new file mode 100644 index 000000000..7d7293217 --- /dev/null +++ b/test/usecases/verbatim/globals.mod @@ -0,0 +1,14 @@ +NEURON { + SUFFIX globals + GLOBAL gbl +} + +ASSIGNED { + gbl +} + +FUNCTION get_gbl() { +VERBATIM +_lget_gbl = gbl; +ENDVERBATIM +} diff --git a/test/usecases/verbatim/test_globals.py b/test/usecases/verbatim/test_globals.py new file mode 100644 index 000000000..c6bc2427a --- /dev/null +++ b/test/usecases/verbatim/test_globals.py @@ -0,0 +1,13 @@ +from neuron import h, gui + +def test_globals(): + s = h.Section() + s.insert("globals") + + h.gbl_globals = 654.0 + + assert h.globals.get_gbl() == h.gbl + + +if __name__ == "__main__": + test_globals()