]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/archy/test/multi_line.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / archy / test / multi_line.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/archy/test/multi_line.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/archy/test/multi_line.js
new file mode 100644 (file)
index 0000000..2cf2154
--- /dev/null
@@ -0,0 +1,45 @@
+var test = require('tape');
+var archy = require('../');
+
+test('multi-line', function (t) {
+    var s = archy({
+      label : 'beep\none\ntwo',
+      nodes : [
+        'ity',
+        {
+          label : 'boop',
+          nodes : [
+            {
+              label : 'o_O\nwheee',
+              nodes : [
+                {
+                  label : 'oh',
+                  nodes : [ 'hello', 'puny\nmeat' ]
+                },
+                'creature'
+              ]
+            },
+            'party\ntime!'
+          ]
+        }
+      ]
+    });
+    t.equal(s, [
+        'beep',
+        '│ one',
+        '│ two',
+        '├── ity',
+        '└─┬ boop',
+        '  ├─┬ o_O',
+        '  │ │ wheee',
+        '  │ ├─┬ oh',
+        '  │ │ ├── hello',
+        '  │ │ └── puny',
+        '  │ │     meat',
+        '  │ └── creature',
+        '  └── party',
+        '      time!',
+        ''
+    ].join('\n'));
+    t.end();
+});