diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cyclic.at | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/tests/cyclic.at b/tests/cyclic.at index 7c24acf..1cc542d 100644 --- a/tests/cyclic.at +++ b/tests/cyclic.at @@ -15,6 +15,7 @@ # along with GNU pies. If not, see <http://www.gnu.org/licenses/>. AT_SETUP([Detecting cyclic dependencies]) + AT_CHECK([ PIES_XFAIL_CHECK # The following matrices describe the test.conf configuration file below. @@ -105,10 +106,38 @@ Legend: 1: g 2: h ], -[pies: component a depends on itself +[pies: cyclic dependencies detected: pies: a -> d -> c -> e -> a -pies: component b depends on itself pies: b -> b ]) +AT_CHECK([ +AT_DATA([test.conf],[ +component a { + command "a"; + prerequisites (b,c); +} +component b { + command "b"; + prerequisites (c); +} +component c { + command "c"; + prerequisites (d); +} +component d { + command "d"; + prerequisites (a); +} +]) +pies --config-file test.conf --dump-depmap | trimws +], +[0], +[No components defined +], +[pies: cyclic dependencies detected: +pies: a -> c -> d -> a +pies: a -> b -> c -> d -> a +]) + AT_CLEANUP |