# file : unit-tests/test/script/parser/include.test # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file : none : $* <>>foo.test; $* <>EOO .include foo.test EOI cmd EOO : multiple : cat <"cmd foo" >>>foo.test; cat <"cmd bar" >>>bar.test; $* <>EOO .include foo.test bar.test EOI cmd foo cmd bar EOO : once : cat <"cmd" >>>foo.test; $* <>EOO .include foo.test x .include --once foo.test .include --once bar/../foo.test y .include ../once/foo.test EOI cmd x y cmd EOO : group-id : cat <>>foo.test; { x = b } EOI $* -s -i <>EOO x = a .include foo.test EOI { { # 2-foo-1 } } EOO : test-id : cat <>>foo.test; cmd EOI $* -s -i <>EOO x = a .include foo.test EOI { { # 2-foo-1 cmd } } EOO : invalid-path : $* <>EOE != 0 .include "" EOI testscript:1:2: error: invalid testscript include path '' EOE : unable-open : $* <>~/EOE/ != 0 .include foo.test EOI /testscript:1:2: error: unable to read testscript foo.test: .+/ EOE