Move test suite into module hierarchy
This commit is contained in:
parent
032d6dcae7
commit
dc941ca543
17 changed files with 1317 additions and 0 deletions
35
test/code/Root/root.js
Executable file
35
test/code/Root/root.js
Executable file
|
@ -0,0 +1,35 @@
|
|||
function main_action() {
|
||||
res.redirect(root.href("jala.test"));
|
||||
}
|
||||
|
||||
function hello_action() {
|
||||
res.contentType = "text/plain";
|
||||
res.write("Hello");
|
||||
}
|
||||
|
||||
function throwerror_action() {
|
||||
throw Error();
|
||||
}
|
||||
|
||||
function notfound_action() {
|
||||
res.write("Not found");
|
||||
}
|
||||
|
||||
function redirect_action() {
|
||||
res.redirect(this.href("hello"));
|
||||
}
|
||||
|
||||
function error_action() {
|
||||
res.write("Error");
|
||||
}
|
||||
|
||||
function long_action() {
|
||||
res.write(makeLongString());
|
||||
}
|
||||
|
||||
function macro_macro(param) {
|
||||
// change suffix
|
||||
if (param.suffix) param.suffix = ".";
|
||||
return this.string;
|
||||
}
|
||||
|
16
test/code/Root/type.properties
Executable file
16
test/code/Root/type.properties
Executable file
|
@ -0,0 +1,16 @@
|
|||
date = date
|
||||
string = string
|
||||
|
||||
|
||||
organisations = collection(Organisation)
|
||||
organisations.accessname = org_name
|
||||
|
||||
organisationsByCountry = collection(Organisation)
|
||||
organisationsByCountry.group = org_country
|
||||
organisationsByCountry.group.prototype = Country
|
||||
organisationsByCountry.group.order = org_country desc
|
||||
organisationsByCountry.order = org_name desc
|
||||
|
||||
persons = collection(Person)
|
||||
|
||||
someMountpoint = mountpoint(SomeMountpoint)
|
Loading…
Add table
Add a link
Reference in a new issue