summaryrefslogtreecommitdiffabout
path: root/tests
Side-by-side diff
Diffstat (limited to 'tests') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/cyclic.at33
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
@@ -17,2 +17,3 @@
AT_SETUP([Detecting cyclic dependencies])
+
AT_CHECK([
@@ -107,5 +108,4 @@ Legend:
],
-[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
@@ -113,2 +113,31 @@ 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

Return to:

Send suggestions and report system problems to the System administrator.