From 9adb88d13261354f0a33841a4210453723e3cfd9 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 3 May 2020 15:47:21 -0400 Subject: [PATCH] Added a test case for walking up the context --- js/test_cases/walk_up/input1.json | 11 +++++++++++ js/test_cases/walk_up/main.dust | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 js/test_cases/walk_up/input1.json create mode 100644 js/test_cases/walk_up/main.dust diff --git a/js/test_cases/walk_up/input1.json b/js/test_cases/walk_up/input1.json new file mode 100644 index 0000000..993ee52 --- /dev/null +++ b/js/test_cases/walk_up/input1.json @@ -0,0 +1,11 @@ +{ + "company": "The Pendulum", + "globals": { + "email": "email hidden" + }, + "people": [ + {"name": "Alice", "job": "Chief Swinger"}, + {"name": "Bob", "job": "Chief Swayer"}, + {"name": "Chris", "job": "Barista", "company": "GenericCoffee"} + ] +} diff --git a/js/test_cases/walk_up/main.dust b/js/test_cases/walk_up/main.dust new file mode 100644 index 0000000..af4f875 --- /dev/null +++ b/js/test_cases/walk_up/main.dust @@ -0,0 +1,4 @@ +Directory for {company}:{~n} +{#people} +{name}: {job} at {company} (email: {globals.email}){~n} +{/people}