sandboxos => tildefriends

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3157 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2016-03-12 18:50:43 +00:00
commit 7c6a377c0b
94 changed files with 27121 additions and 0 deletions

27
tests/04-promise Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
cat > test.js << EOF
var task = new Task();
task.activate();
task.execute("child.js").then(function() {
task.getExports().then(function(exports) {
return exports.add(1, 1);
}).then(function(sum) {
if (sum == 2) {
exit(0);
} else {
exit(1);
}
});
});
EOF
cat > child.js << EOF
exports = {
add: function(left, right) {
return left + right;
}
}
EOF
$SANDBOXOS test.js