]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/node_modules/promzard/test/simple.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / init-package-json / node_modules / promzard / test / simple.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/node_modules/promzard/test/simple.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/node_modules/promzard/test/simple.js
new file mode 100644 (file)
index 0000000..034a864
--- /dev/null
@@ -0,0 +1,30 @@
+var test = require('tap').test;
+var promzard = require('../');
+
+test('simple', function (t) {
+    t.plan(1);
+    
+    var ctx = { tmpdir : '/tmp' }
+    var file = __dirname + '/simple.input';
+    promzard(file, ctx, function (err, output) {
+        t.same(
+            {
+                a : 3,
+                b : '!2b',
+                c : {
+                    x : 55,
+                    y : '/tmp/y/file.txt',
+                }
+            },
+            output
+        );
+    });
+    
+    setTimeout(function () {
+        process.stdin.emit('data', '\n');
+    }, 100);
+    
+    setTimeout(function () {
+        process.stdin.emit('data', '55\n');
+    }, 200);
+});