40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
if(!TestApp.verbose) return;
print("ERROR: "+WhAjaj.stringify(opt));
};
cb.onResponse = function(resp,req){
if(!TestApp.verbose) return;
print("GOT RESPONSE: "+(('string'===typeof resp) ? resp : WhAjaj.stringify(resp)));
};
})();
/**
Throws an exception of cond is a falsy value.
*/
function assert(cond, descr){
descr = descr || "Undescribed condition.";
|
|
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
if(!TestApp.verbose) return;
print("ERROR: "+WhAjaj.stringify(opt));
};
cb.onResponse = function(resp,req){
if(!TestApp.verbose) return;
print("GOT RESPONSE: "+(('string'===typeof resp) ? resp : WhAjaj.stringify(resp)));
};
})();
/**
Throws an exception of cond is a falsy value.
*/
function assert(cond, descr){
descr = descr || "Undescribed condition.";
|
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
}
testHAI.description = 'Get server version info.';
function testIAmNobody(){
TestApp.fossil.whoami('/json/whoami');
assert('nobody' === TestApp.fossil.auth.name, 'User == nobody.' );
assert(!TestApp.fossil.auth.authToken, 'authToken is not set.' );
}
testIAmNobody.description = 'Ensure that current user is "nobody".';
function testAnonymousLogin(){
TestApp.fossil.login();
assert('string' === typeof TestApp.fossil.auth.authToken, 'authToken = '+TestApp.fossil.auth.authToken);
|
|
|
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
}
testHAI.description = 'Get server version info.';
function testIAmNobody(){
TestApp.fossil.whoami('/json/whoami');
assert('nobody' === TestApp.fossil.auth.name, 'User == nobody.' );
assert(!TestApp.fossil.auth.authToken, 'authToken is not set.' );
}
testIAmNobody.description = 'Ensure that current user is "nobody".';
function testAnonymousLogin(){
TestApp.fossil.login();
assert('string' === typeof TestApp.fossil.auth.authToken, 'authToken = '+TestApp.fossil.auth.authToken);
|
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
osb.write(json,0, json.length);
osb.close();
req = json = outs = osr = osb = undefined;
var ins = p.getInputStream();
var isr = new java.io.InputStreamReader(ins);
var br = new java.io.BufferedReader(isr);
var line;
while( null !== (line=br.readLine())){
print(line);
}
br.close();
isr.close();
ins.close();
p.waitFor();
|
|
|
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
osb.write(json,0, json.length);
osb.close();
req = json = outs = osr = osb = undefined;
var ins = p.getInputStream();
var isr = new java.io.InputStreamReader(ins);
var br = new java.io.BufferedReader(isr);
var line;
while( null !== (line=br.readLine())){
print(line);
}
br.close();
isr.close();
ins.close();
p.waitFor();
|