From 40788ebabde695b087a7d8918fc91de72a8068b4 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sun, 23 Oct 2016 23:39:56 -0700 Subject: [PATCH] Add self_dependency test. --- src/tests.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/tests.rs b/src/tests.rs index 8eb6745..03cad6c 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -292,6 +292,19 @@ fn circular_dependency() { }); } +#[test] +fn self_dependency() { + let text = "a: a"; + parse_error(text, Error { + text: text, + index: 3, + line: 0, + column: 3, + width: Some(1), + kind: ErrorKind::CircularDependency{recipe: "a", circle: vec!["a", "a"]} + }); +} + #[test] fn unknown_dependency() { let text = "a: b";