/usr/share/doc/node-bignumber/test/browser/every-test.html is in node-bignumber 1.3.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | <!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>Testing bignumber.js</title>
<style> body {font-family: monospace; font-size: 12px; line-height: 14px;}</style>
<script src='../../bignumber.js'></script>
</head>
<body>
<script>
var arr,
passed = 0,
total = 0,
i = 0,
start = +new Date(),
methods = [
'abs',
'base-in',
'base-out',
'ceil',
'cmp',
'config',
'div',
'floor',
'minus',
'mod',
'neg',
'others',
'plus',
'pow',
'round',
'sqrt',
'times',
'toExponential',
'toFixed',
'toFraction',
'toPrecision',
'toString'
];
function load() {
var head = document.getElementsByTagName("head")[0],
script = document.createElement("script");
script.src = '../' + methods[i] + '.js';
if (!methods[i++]) {
document.body.innerHTML += '<br>IN TOTAL: ' + passed + ' of ' + total +
' tests passed in ' + ( (+new Date() - start) / 1000 ) + ' secs.<br>';
document.body.scrollIntoView(false);
return;
}
script.onload = script.onreadystatechange = function () {
if (!script.readyState || /loaded|complete/.test(script.readyState)) {
if (!count) {
document.body.innerHTML +=
'<br><span style="color: red">TEST SCRIPT FAILED - see error console.</span>';
} else {
passed += count[0];
total += count[1];
}
head.removeChild(script);
count = script = null;
document.body.innerHTML += '<br>';
document.body.scrollIntoView(false);
setTimeout(load, 0);
}
};
head.appendChild(script);
}
document.body.innerHTML += 'BIGNUMBER TESTING<br>';
load();
</script>
</body>
</html>
|