Skip to content

Instantly share code, notes, and snippets.

View tolmasky's full-sized avatar

Francisco Ryan Tolmasky I tolmasky

View GitHub Profile
var testCaseFile = require("file").absolute(args.shift());
if (!testCaseFile)
{
[self report];
return;
}
var matches = testCaseFile.match(/([^\/]+)\.j$/);
var FileList = require("jake").FileList;
@implementation CFPropertyListTest : OJTestCase
- (void)testFormatSniffing
{print("INSIDE");
var XMLPropertyLists = new FileList("PropertyLists/XML-*.plist");
print(module.path);// + " " + XMLPropertyLists.toArray());
XMLPropertyLists.forEach(function(/*String*/ aPath)
return function(require, exports, module, system, print)
{print("for " + path + " " + module + " " + module.path);
Executable.setCommonJSArguments(require, exports, module, system, print, window);
fileImporterForPath(FILE.dirname(path))(path, function()
{
print("all done");
});
}
path undefined
toString function () {
return baseId;
}
xNarwhalCurry function (block) {
block.xNarwhalCurry = true;
return block;
}
setExports function (exports) {
return exportsMemo[baseId] = exports;
cwd: function()
{
var DOMBaseElement = document.getElementsByTagName("base")[0];
if (DOMBaseElement)
return FILE.dirname(DOMBaseElement.getAttribute("href"));
return FILE.dirname(window.location.pathname);
},
diff --git a/AppKit/CPApplication.j b/AppKit/CPApplication.j
index c8debf4..e5452ee 100644
--- a/AppKit/CPApplication.j
+++ b/AppKit/CPApplication.j
@@ -1043,7 +1043,7 @@ var _CPAppBootstrapperActions = nil;
+ (void)actions
{
- return [@selector(bootstrapPlatform), @selector(loadDefaultTheme), @selector(loadMainCibFile)];
+ return [@selector(loadDefaultTheme)];//[@selector(bootstrapPlatform)];//[@selector(bootstrapPlatform), @selector(loadDefaultTheme), @selector(loadMainCibFile)];
for (var object, index in [1,2,3,4,5])
{
console.log("index: " + object);
}
for (var object, index, e = new objj_fastEnumerator([1,2,3,4,5]); e.i < e.l || e.e() && e.i < e.l; object = e.o[e.i][0], index = e.o[e.i][1], e.i++)
{
console.log("index: " + object);
}
theRootYouMade = ...;
// bootstrap...
var cwd = FILE.cwd();
if (cwd === "/")
rootResource = theRootYouMade;
else
<script>
var date = new Date(),
total = 0;
for (i = 0; i < 10000; ++i)
if ((/^(@end(?![$\w]))$/m).test("@end"))
total += 1;
var elapsed = new Date() - date;
console.log(elapsed + " " + total)
var date = new Date(),