function createUntitled(count) {
                function doCreateUntitled(content) {
                    runs(function () {
                        var promise = CommandManager.execute(Commands.FILE_NEW_UNTITLED);
                        promise.done(function (untitledDoc) {
                            untitledDoc.replaceRange(content, {line: 0, ch: 0});
                        });
                        waitsForDone(promise, "FILE_NEW_UNTITLED");
                    });
                }

                var i;
                for (i = 0; i < count; i++) {
                    doCreateUntitled(String(i));
                }
            }
Creates N untitled documents with distinct content (the file's creation-order index as a string)