1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-01 08:05:44 +01:00

Clarify some arg counts and some related tests.

--HG--
extra : rebase_source : e50c757b46406988b0bfa0c179ec1e9bad21a446
This commit is contained in:
Doug Kearns
2011-06-29 20:11:22 +10:00
parent 07bd83d7e4
commit ab7ad88b21
9 changed files with 228 additions and 66 deletions

View File

@@ -1886,7 +1886,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
util.rehash(args); util.rehash(args);
}, },
{ {
argCount: "0", argCount: "0", // FIXME
options: [ options: [
{ {
names: ["+u"], names: ["+u"],
@@ -2024,7 +2024,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
dactyl.echoerr(e); dactyl.echoerr(e);
} }
}, { }, {
argCount: "+", argCount: "1",
bang: true, bang: true,
completer: function (context) { completer: function (context) {
if (/^:/.test(context.filter)) if (/^:/.test(context.filter))
@@ -2055,7 +2055,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
vbs.setFrom = setFrom; vbs.setFrom = setFrom;
} }
}, { }, {
argCount: "+", argCount: "1",
completer: function (context) completion.ex(context), completer: function (context) completion.ex(context),
count: true, count: true,
literal: 0, literal: 0,

View File

@@ -1620,6 +1620,7 @@ var Events = Module("events", {
else else
dactyl.echoerr(_("error.argumentRequired")); dactyl.echoerr(_("error.argumentRequired"));
}, { }, {
argCount: "?",
bang: true, bang: true,
completer: function (context) completion.macro(context), completer: function (context) completion.macro(context),
literal: 0 literal: 0

View File

@@ -621,16 +621,14 @@ var Tabs = Module("tabs", {
commands.add(["keepa[lt]"], commands.add(["keepa[lt]"],
"Execute a command without changing the current alternate buffer", "Execute a command without changing the current alternate buffer",
function (args) { function (args) {
let alternate = tabs.alternate;
try { try {
dactyl.execute(args[0], null, true); dactyl.execute(args[0], null, true);
} }
finally { finally {
tabs.updateSelectionHistory([tabs.getTab(), alternate]); tabs.updateSelectionHistory([tabs.getTab(), tabs.alternate]);
} }
}, { }, {
argCount: "+", argCount: "1",
completer: function (context) completion.ex(context), completer: function (context) completion.ex(context),
literal: 0, literal: 0,
subCommand: 0 subCommand: 0
@@ -644,7 +642,7 @@ var Tabs = Module("tabs", {
dactyl.execute(args[0], null, true); dactyl.execute(args[0], null, true);
}); });
}, { }, {
argCount: "+", argCount: "1",
completer: function (context) completion.ex(context), completer: function (context) completion.ex(context),
literal: 0, literal: 0,
subCommand: 0 subCommand: 0

View File

@@ -1596,6 +1596,7 @@ var Commands = Module("commands", {
dactyl.echomsg(_("command.yank.yankedLine" + (lines == 1 ? "" : "s"), lines)); dactyl.echomsg(_("command.yank.yankedLine" + (lines == 1 ? "" : "s"), lines));
}, },
{ {
argCount: "1",
completer: function (context) modules.completion[/^:/.test(context.filter) ? "ex" : "javascript"](context), completer: function (context) modules.completion[/^:/.test(context.filter) ? "ex" : "javascript"](context),
literal: 0 literal: 0
}); });

View File

@@ -841,7 +841,7 @@ unlet s:cpo_save
modules.autocommands.trigger("ShellCmdPost", {}); modules.autocommands.trigger("ShellCmdPost", {});
}, { }, {
argCount: "?", // TODO: "1" - probably not worth supporting weird Vim edge cases. The dream is dead. --djk argCount: "1",
bang: true, bang: true,
// This is abominably slow. // This is abominably slow.
// completer: function (context) completion.shellCommand(context), // completer: function (context) completion.shellCommand(context),

View File

@@ -842,6 +842,7 @@ var JavaScript = Module("javascript", {
.open(); .open();
} }
}, { }, {
argCount: "?",
bang: true, bang: true,
completer: function (context) modules.completion.javascript(context), completer: function (context) modules.completion.javascript(context),
hereDoc: true, hereDoc: true,

View File

@@ -45,14 +45,25 @@ function toolbarState(selector, state)
var tests = { var tests = {
"!": { "!": {
error: [""],
multiOutput: ["echo foo"] multiOutput: ["echo foo"]
}, },
get Clistkeys() this.listcommands,
Cmap: {},
Cnoremap: {},
Cunmap: {},
get Ilistkeys() this.listcommands,
Imap: {},
Inoremap: {},
Iunmap: {},
abbreviate: { abbreviate: {
error: ["!"],
someOutput: ["", "abc"], someOutput: ["", "abc"],
noOutput: ["abc def", "-js abc def"], noOutput: ["abc def", "-js abc def"],
completions: ["", "abc ", "-js abc "] completions: ["", "abc ", "-js abc "]
}, },
addons: { addons: {
error: ["!"],
multiOutput: ["", "dactyl", "-type=extension", "-type=extension dactyl"], multiOutput: ["", "dactyl", "-type=extension", "-type=extension dactyl"],
completions: [ completions: [
"", "",
@@ -75,6 +86,8 @@ var tests = {
anyOutput: ["about:pentadactyl"], anyOutput: ["about:pentadactyl"],
completions: [["", hasItems]] completions: [["", hasItems]]
}, },
get blistkeys() this.listcommands,
bmap: {},
bmark: { bmark: {
singleOutput: ["", "-tags=foo -title=bar -keyword=baz -charset=UTF-8 -post=quux about:pentadactyl"], singleOutput: ["", "-tags=foo -title=bar -keyword=baz -charset=UTF-8 -post=quux about:pentadactyl"],
error: ["-tags=foo -title=bar -keyword=baz -charset=nonExistentCharset -post=quux about:pentadactyl"], error: ["-tags=foo -title=bar -keyword=baz -charset=nonExistentCharset -post=quux about:pentadactyl"],
@@ -95,6 +108,7 @@ var tests = {
"-max=1 -keyword=foo -tags=bar -title=baz about:" "-max=1 -keyword=foo -tags=bar -title=baz about:"
] ]
}, },
bnoremap: {},
buffer: { buffer: {
anyOutput: ["", "1"], anyOutput: ["", "1"],
noOutput: ["!", "! 1"], noOutput: ["!", "! 1"],
@@ -104,15 +118,21 @@ var tests = {
] ]
}, },
buffers: { buffers: {
error: ["!"],
multiOutput: ["", "1"], multiOutput: ["", "1"],
completions: ["", "1"] completions: ["", "1"]
}, },
bunmap: {},
cd: { cd: {
error: ["!"],
singleOutput: ["", "~/"], singleOutput: ["", "~/"],
completions: ["", "~/"] completions: ["", "~/"]
}, },
get clistkeys() this.listcommands,
cmap: {},
cnoremap: {},
colorscheme: { colorscheme: {
error: ["", "some-nonexistent-scheme"] error: ["!", "", "some-nonexistent-scheme"]
}, },
command: { command: {
init: ["delc!"], init: ["delc!"],
@@ -131,15 +151,22 @@ var tests = {
["-group=user ", hasItems] ["-group=user ", hasItems]
] ]
}, },
contexts: {}, // Not testable in this manner completions: {
error: ["!", ""]
},
contexts: { // Not testable in this manner
error: ["!"]
},
cookies: { cookies: {
anyOutput: ["dactyl.sf.net", "dactyl.sf.net list"], anyOutput: ["dactyl.sf.net", "dactyl.sf.net list"],
error: [""], error: ["!", ""],
completions: [ completions: [
"", "",
["dactyl.sf.net ", hasItems] ["dactyl.sf.net ", hasItems]
] ]
}, },
cunabbreviate: {},
cunmap: {},
delbmarks: { anyOutput: ["", "about:pentadactyl"] }, delbmarks: { anyOutput: ["", "about:pentadactyl"] },
delcommand: [ delcommand: [
{ {
@@ -157,8 +184,12 @@ var tests = {
error: ["foo"] error: ["foo"]
} }
], ],
delgroup: {
error: ["!", "", "builtin"],
completions: [""]
},
delmacros: { delmacros: {
error: [""], error: ["", "! foo"],
noOutput: ["x"], noOutput: ["x"],
completions: ["", "x"] completions: ["", "x"]
}, },
@@ -168,17 +199,27 @@ var tests = {
completions: ["", "-name=", "-name=foo ", "-index=", "-index="] completions: ["", "-name=", "-name=foo ", "-index=", "-index="]
}, },
dialog: { dialog: {
error: ["!", ""],
// Skip implementation for now // Skip implementation for now
completions: [ completions: [
["", hasntNullItems] ["", hasntNullItems]
] ]
}, },
doautoall: {}, // Skip for now dlclear: {
doautocmd: {}, // Skip for now error: ["!"]
},
doautoall: {
error: ["!"]
},
doautocmd: {
error: ["!"]
},
downloads: { downloads: {
error: ["!"],
multiOutput: ["", "dactyl", "dactyl"] multiOutput: ["", "dactyl", "dactyl"]
}, },
echo: { echo: {
error: ["!"],
singleOutput: [ singleOutput: [
["' - '", " - "] ["' - '", " - "]
], ],
@@ -199,25 +240,35 @@ var tests = {
__proto__: this.echo, __proto__: this.echo,
}), }),
get echomsg() this.echo, get echomsg() this.echo,
else: {}, // Skip for now else: {
elseif: {}, // Skip for now error: ["!", "foo"]
},
elseif: {
error: ["!", ""]
},
emenu: { emenu: {
noOutput: ["View.Zoom.Zoom In", "View.Zoom.Zoom Out"], noOutput: ["View.Zoom.Zoom In", "View.Zoom.Zoom Out"],
error: [""], error: ["!", ""],
completions: [ completions: [
["", hasItems], ["", hasItems],
["View.", hasItems] ["View.", hasItems]
] ]
}, },
endif: {}, // Skip for now endif: {
error: ["!", "foo"]
},
execute: { execute: {
error: ["!"],
noOutput: ["", "'js " + "".quote() + "'"], noOutput: ["", "'js " + "".quote() + "'"],
someOutput: ["'ls'"], someOutput: ["'ls'"],
completions: [["", hasItems]] completions: [["", hasItems]]
}, },
exit: {
error: ["foo"]
},
extadd: { extadd: {
completions: [["", hasItems]], completions: [["", hasItems]],
error: [""] error: ["!", ""]
}, },
extdelete: { extdelete: {
completions: [["", hasItems]], completions: [["", hasItems]],
@@ -239,12 +290,14 @@ var tests = {
noOutput: ["<Esc>"], noOutput: ["<Esc>"],
error: [""] error: [""]
}, },
finish: { noOutput: [""] }, finish: {
error: ["!", "foo"],
noOutput: [""]
},
forward: { noOutput: [""] }, forward: { noOutput: [""] },
frameonly: { noOutput: [""] }, frameonly: {
delgroup: { error: ["!", "foo"],
error: ["builtin"], noOutput: [""]
completions: [""]
}, },
group: { group: {
multiOutput: [""], multiOutput: [""],
@@ -263,6 +316,7 @@ var tests = {
}, },
hardcopy: {}, // Skip for now hardcopy: {}, // Skip for now
help: { help: {
error: ["!"],
noOutput: ["", "intro"], noOutput: ["", "intro"],
cleanup: ["tabdelete", "tabdelete"], cleanup: ["tabdelete", "tabdelete"],
completions: [ completions: [
@@ -272,6 +326,7 @@ var tests = {
}, },
get helpall() this.help, get helpall() this.help,
highlight: { highlight: {
error: ["!"],
multiOutput: ["", "Help"], multiOutput: ["", "Help"],
noOutput: [ noOutput: [
"Help foo: bar;", "Help foo: bar;",
@@ -299,7 +354,15 @@ var tests = {
"-sort=+date about:" "-sort=+date about:"
] ]
}, },
if: {}, // Skip for now if: {
error: ["!", ""],
},
iabbreviate: {},
get ilistkeys() this.listcommands,
imap: {},
inoremap: {},
iunabbreviate: {},
iunmap: {},
javascript: { javascript: {
noOutput: ["''", "'\\n'", "<pre>foo bar</pre>", "window", "<<EOF\n''\nEOF"], noOutput: ["''", "'\\n'", "<pre>foo bar</pre>", "window", "<<EOF\n''\nEOF"],
completions: [ completions: [
@@ -325,16 +388,20 @@ var tests = {
] ]
}, },
jumps: { jumps: {
error: ["!", "foo"],
multiOutput: [""] multiOutput: [""]
}, },
keepalt: { keepalt: {
error: ["", "some-nonexistent-command"], error: ["!", "", "some-nonexistent-command"],
noOutput: ["js ''"], noOutput: ["js ''"],
anyOutput: ["echo 'foo'"], anyOutput: ["echo 'foo'"],
completions: [["", hasItems]] completions: [["", hasItems]]
}, },
let: {}, // Deprecated. Fuck it. let: {
error: ["!"]
},
listcommands: { listcommands: {
error: ["!"],
anyOutput: ["", "in"], anyOutput: ["", "in"],
completions: [ completions: [
["", hasItems], ["", hasItems],
@@ -345,10 +412,12 @@ var tests = {
get listoptions() this.listcommands, get listoptions() this.listcommands,
loadplugins: {}, loadplugins: {},
macros: { macros: {
error: ["!"],
multiOutput: [""], multiOutput: [""],
completions: [""] completions: [""]
}, },
map: { map: {
error: ["!"],
init: ["unmap!"], init: ["unmap!"],
anyOutput: [""], anyOutput: [""],
singleOutput: ["i"], singleOutput: ["i"],
@@ -379,21 +448,22 @@ var tests = {
] ]
}, },
mark: { mark: {
error: ["", "#", "xy"], error: ["!", "", "#", "xy"],
noOutput: ["y"], noOutput: ["y"],
completions: [""] completions: [""]
}, },
marks: { marks: {
init: ["delmarks q"], init: ["delmarks q"],
multiOutput: ["", "y"], multiOutput: ["", "y"],
error: ["q", "#"], error: ["!", "q", "#"],
completions: [""] completions: [""]
}, },
messages: { messages: {
error: ["!", "foo"],
anyOutput: ["messages"] anyOutput: ["messages"]
}, },
messclear: { messclear: {
error: ["q"], error: ["!", "foo"],
noOutput: [""] noOutput: [""]
}, },
mkpentadactylrc: { mkpentadactylrc: {
@@ -421,12 +491,26 @@ var tests = {
], ],
cleanup: ["silent !rm -r some-nonexistent-pentadactyl-dir/"] cleanup: ["silent !rm -r some-nonexistent-pentadactyl-dir/"]
}, },
get mlistkeys() this.listcommands,
mmap: {},
mnoremap: {},
munmap: {},
get nlistkeys() this.listcommands,
nmap: {},
nnoremap: {},
nohlfind: {
error: ["!", "foo"]
},
noremap: {},
normal: { normal: {
error: [""],
noOutput: ["<Nop>"], noOutput: ["<Nop>"],
singleOutput: ["<C-g>"], singleOutput: ["<C-g>"],
multiOutput: ["g<C-g>"] multiOutput: ["g<C-g>"]
}, },
nunmap: {},
open: { open: {
error: ["!"],
noOutput: ["about:blank | about:home"], noOutput: ["about:blank | about:home"],
completions: [ completions: [
["", hasItems], ["", hasItems],
@@ -443,13 +527,18 @@ var tests = {
pageinfo: { pageinfo: {
multiOutput: ["", "fgm"], multiOutput: ["", "fgm"],
completions: [["", hasItems]], completions: [["", hasItems]],
error: ["abcdefghijklmnopqrstuvwxyz", "f g m"] error: ["!", "abcdefghijklmnopqrstuvwxyz", "f g m"]
}, },
pagestyle: { pagestyle: {
error: ["!"],
completions: [""] completions: [""]
}, },
preferences: {}, // Skip for now pintab: {},
preferences: {
error: ["foo"]
},
pwd: { pwd: {
error: ["!", "foo"],
singleOutput: [""] singleOutput: [""]
}, },
qmark: { qmark: {
@@ -457,13 +546,16 @@ var tests = {
"m", "m",
"m foo bar" "m foo bar"
], ],
error: ["", "#"], error: ["!", "", "#"],
completions: [ completions: [
["", hasItems], ["", hasItems],
["m ", hasItems] ["m ", hasItems]
] ]
}, },
qmarks: [ qmarks: [
{
error: ["!"]
},
{ {
init: ["delqmarks a-zA-Z0-9"], init: ["delqmarks a-zA-Z0-9"],
error: ["", "x"], error: ["", "x"],
@@ -474,20 +566,29 @@ var tests = {
completions: [["", hasItems]] completions: [["", hasItems]]
} }
], ],
quit: {}, // Skip for now quit: {
quitall: {}, // Skip for now error: ["foo"]
},
quitall: {
error: ["!", "foo"]
},
redraw: { redraw: {
error: ["!", "foo"],
noOutput: [""] noOutput: [""]
}, },
rehash: {}, // Skip for now rehash: {
error: ["!"]
},
reload: { reload: {
error: ["foo"],
noOutput: [""] noOutput: [""]
}, },
reloadall: { reloadall: {
error: ["foo"],
noOutput: [""] noOutput: [""]
}, },
restart: { restart: {
error: ["foo"] error: ["!", "foo"]
}, },
runtime: { runtime: {
init: [ init: [
@@ -504,6 +605,7 @@ var tests = {
"some-nonexistent/good.penta" "some-nonexistent/good.penta"
], ],
error: [ error: [
"",
"some-nonexistent/bad.js", "some-nonexistent/bad.js",
"some-nonexistent/bad.penta" "some-nonexistent/bad.penta"
], ],
@@ -542,9 +644,12 @@ var tests = {
}, },
saveas: {}, saveas: {},
sbclose: { sbclose: {
error: ["!", "foo"],
noOutput: [""] noOutput: [""]
}, },
scriptnames: {}, scriptnames: {
error: ["!", "foo"]
},
set: { set: {
multiOutput: [ multiOutput: [
"vb?", "cpt?", "messages?", "titlestring?", "au?", "eht?", "vb?", "cpt?", "messages?", "titlestring?", "au?", "eht?",
@@ -598,6 +703,7 @@ var tests = {
] ]
}, },
silent: { silent: {
error: ["!"],
noOutput: [ noOutput: [
"echo 'foo'", "echo 'foo'",
"echo " + "foo\nbar".quote(), "echo " + "foo\nbar".quote(),
@@ -616,6 +722,7 @@ var tests = {
".pentadactyl/some-nonexistent/good.penta" ".pentadactyl/some-nonexistent/good.penta"
], ],
error: [ error: [
"",
".pentadactyl/some-nonexistent/really-nonexistent.js", ".pentadactyl/some-nonexistent/really-nonexistent.js",
"~/.pentadactyl/some-nonexistent/bad.js", "~/.pentadactyl/some-nonexistent/bad.js",
"~/.pentadactyl/some-nonexistent/bad.penta", "~/.pentadactyl/some-nonexistent/bad.penta",
@@ -632,9 +739,16 @@ var tests = {
["resource://dactyl/", hasItems] ["resource://dactyl/", hasItems]
] ]
}), }),
stop: { noOutput: [""] }, stop: {
stopall: { noOutput: [""] }, error: ["!", "foo"],
noOutput: [""]
},
stopall: {
error: ["!", "foo"],
noOutput: [""]
},
style: { style: {
error: ["!"],
cleanup: ["delstyle -n foo"], cleanup: ["delstyle -n foo"],
noOutput: [ noOutput: [
"-name=foo http://does.not.exist/* div { display: inline; }", "-name=foo http://does.not.exist/* div { display: inline; }",
@@ -675,21 +789,29 @@ var tests = {
] ]
}, },
tab: { tab: {
error: ["", "some-nonexistent-command"], error: ["!", "", "some-nonexistent-command"],
noOutput: ["js ''"], noOutput: ["js ''"],
anyOutput: ["echo 'foo'"], anyOutput: ["echo 'foo'"],
completions: [["", hasItems]] completions: [["", hasItems]]
}, },
tabattach: {}, tabattach: {
tabdetach: {}, error: ["!", ""]
},
tabdetach: {
error: ["!", "foo"]
},
tabdo: { tabdo: {
error: ["", "some-nonexistent-command"], error: ["!", "", "some-nonexistent-command"],
noOutput: ["js ''"], noOutput: ["js ''"],
anyOutput: ["echo 'foo'"], anyOutput: ["echo 'foo'"],
completions: [["", hasItems]] completions: [["", hasItems]]
}, },
tabduplicate: {}, tabduplicate: {
tablast: {}, error: ["foo"]
},
tablast: {
error: ["!", "foo"]
},
tabmove: { tabmove: {
error: [""], error: [""],
noOutput: ["1", "$", "999", "-1", "+1", "! +1", "! -1", "-999", "+999", "! +999", "! -999"], noOutput: ["1", "$", "999", "-1", "+1", "! +1", "! -1", "-999", "+999", "! +999", "! -999"],
@@ -698,16 +820,27 @@ var tests = {
["1", hasItems] ["1", hasItems]
] ]
}, },
tabnext: {}, tabnext: {
tabonly: {}, error: ["!", "foo"]
},
tabonly: {
error: ["!", "foo"]
},
tabopen: {}, tabopen: {},
tabprevious: {}, tabprevious: {
tabrewind: {}, error: ["!", "foo"]
},
tabrewind: {
error: ["!", "foo"]
},
time: { time: {
error: ["", ":some-nonexistent-command"/*, "some_nonexistent_reference"*/], // FIXME error: ["", ":some-nonexistent-command"/*, "some_nonexistent_reference"*/], // FIXME
singleOutput: [":js null", "null"] singleOutput: [":js null", "null"]
}, },
get tlistkeys() this.listcommands,
tmap: {},
tnoremap: {},
toolbarhide: { toolbarhide: {
init: [ init: [
["tbs Navigation Toolbar", toolbarState("#nav-bar", true)], ["tbs Navigation Toolbar", toolbarState("#nav-bar", true)],
@@ -718,7 +851,7 @@ var tests = {
["Navigation Toolbar", toolbarState("#nav-bar", false)], ["Navigation Toolbar", toolbarState("#nav-bar", false)],
["Bookmarks Toolbar", toolbarState("#PersonalToolbar", false)] ["Bookmarks Toolbar", toolbarState("#PersonalToolbar", false)]
], ],
error: ["", "foo"] error: ["!", "", "foo"]
}, },
toolbarshow: { toolbarshow: {
completions: [["", hasItems]], completions: [["", hasItems]],
@@ -726,7 +859,7 @@ var tests = {
["Navigation Toolbar", toolbarState("#nav-bar", true)], ["Navigation Toolbar", toolbarState("#nav-bar", true)],
["Bookmarks Toolbar", toolbarState("#PersonalToolbar", true)] ["Bookmarks Toolbar", toolbarState("#PersonalToolbar", true)]
], ],
error: ["", "foo"] error: ["!", "", "foo"]
}, },
toolbartoggle: { toolbartoggle: {
completions: [["", hasItems]], completions: [["", hasItems]],
@@ -738,15 +871,25 @@ var tests = {
["Navigation Toolbar", toolbarState("#nav-bar", false)], ["Navigation Toolbar", toolbarState("#nav-bar", false)],
["Bookmarks Toolbar", toolbarState("#PersonalToolbar", false)] ["Bookmarks Toolbar", toolbarState("#PersonalToolbar", false)]
], ],
error: ["", "foo"] error: ["!", "", "foo"]
}, },
tunmap: {},
unabbreviate: { unabbreviate: {
noOutput: ["abc", "! "], noOutput: ["abc", "! "],
error: [""] error: [""]
}, },
undo: {}, undo: {
undoall: {}, error: ["!"]
unlet: {}, },
undoall: {
error: ["!", "foo"]
},
unpintab: {
error: ["!"]
},
unlet: {
error: [""],
},
unmap: { unmap: {
noOutput: [ noOutput: [
"i", "i",
@@ -762,8 +905,11 @@ var tests = {
"-group=" "-group="
] ]
}, },
verbose: {}, verbose: {
error: ["!", ""]
},
version: { version: {
error: ["foo"],
multiOutput: [ multiOutput: [
["", function (msg) { ["", function (msg) {
var res = /(\w+dactyl) (\S+) \(([\^)]+)\) running on:\nMozilla/; var res = /(\w+dactyl) (\S+) \(([\^)]+)\) running on:\nMozilla/;
@@ -772,11 +918,25 @@ var tests = {
] ]
}, },
viewsource: {}, viewsource: {},
winclose: {}, get vlistkeys() this.listcommands,
window: {}, vmap: {},
winonly: {}, vnoremap: {},
winopen: {}, vunmap: {},
wqall: {}, winclose: {
error: ["!", "foo"]
},
window: {
error: ["!", ""]
},
winonly: {
error: ["!", "foo"]
},
winopen: {
error: ["!"]
},
wqall: {
error: ["!", "foo"]
},
yank: { yank: {
multiOutput: [ multiOutput: [
["foo".quote(), /foo/], ["foo".quote(), /foo/],
@@ -784,6 +944,7 @@ var tests = {
[":addons", /Pentadactyl/] [":addons", /Pentadactyl/]
], ],
error: [ error: [
"!", "",
":echoerr " + "foo".quote() ":echoerr " + "foo".quote()
], ],
completions: [ completions: [

View File

@@ -248,7 +248,7 @@ var Config = Module("config", ConfigBase, {
}); });
}, },
{ {
argCount: "+", argCount: "1",
completer: function (context) completion.ex(context), completer: function (context) completion.ex(context),
literal: 0, literal: 0,
subCommand: 0 subCommand: 0

View File

@@ -453,7 +453,7 @@ const Mail = Module("mail", {
"Copy selected messages", "Copy selected messages",
function (args) { mail._moveOrCopy(true, args.literalArg); }, function (args) { mail._moveOrCopy(true, args.literalArg); },
{ {
argCount: 1, argCount: "1",
completer: function (context) completion.mailFolder(context), completer: function (context) completion.mailFolder(context),
literal: 0 literal: 0
}); });
@@ -462,7 +462,7 @@ const Mail = Module("mail", {
"Move selected messages", "Move selected messages",
function (args) { mail._moveOrCopy(false, args.literalArg); }, function (args) { mail._moveOrCopy(false, args.literalArg); },
{ {
argCount: 1, argCount: "1",
completer: function (context) completion.mailFolder(context), completer: function (context) completion.mailFolder(context),
literal: 0 literal: 0
}); });