summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-02-07 14:24:04 -0500
committerKris Maglione <maglione.k@gmail.com>2011-02-07 14:24:04 -0500
commitf4b88909a4f00191ba81157bc4b40b7bf2d6b71e (patch)
treef2fe8c64b5006526b2ad2ed0e02ac247e5386b02
parent68b42e466e190c1d02847429a58032ca43ddacaa (diff)
parentbb0b6f8bdb703085e343d98cc9cac4cebf710958 (diff)
downloadpentadactyl-f4b88909a4f00191ba81157bc4b40b7bf2d6b71e.tar.gz
Merge default.
--HG-- branch : groups
-rw-r--r--common/modules/io.jsm2
-rw-r--r--common/tests/functional/testCommands.js35
2 files changed, 23 insertions, 14 deletions
diff --git a/common/modules/io.jsm b/common/modules/io.jsm
index 9727d66f..522b2832 100644
--- a/common/modules/io.jsm
+++ b/common/modules/io.jsm
@@ -431,6 +431,8 @@ var IO = Module("io", {
if (!file || !file.exists()) {
util.dactyl.echoerr("Command not found: " + program);
+ if (callable(blocking))
+ util.trapErrors(blocking);
return -1;
}
diff --git a/common/tests/functional/testCommands.js b/common/tests/functional/testCommands.js
index 60fc7b8f..618b688f 100644
--- a/common/tests/functional/testCommands.js
+++ b/common/tests/functional/testCommands.js
@@ -115,7 +115,7 @@ var tests = {
completions: ["", "~/"]
},
colorscheme: {
- error: ["", "some-non-existent-scheme"]
+ error: ["", "some-nonexistent-scheme"]
},
command: {
init: ["comclear"],
@@ -137,9 +137,16 @@ var tests = {
]
},
delbmarks: { anyOutput: ["", "about:pentadactyl"] },
- delcommand: {
- noOutput: ["foo"] // TODO: Why is this failing? "Unexpected command output: delcommand foo"
- },
+ delcommand: [
+ {
+ init: ["comclear", "command foo bar"],
+ noOutput: ["foo"]
+ },
+ {
+ init: ["comclear"],
+ error: ["foo"]
+ }
+ ],
delmacros: {
error: [""],
noOutput: ["x"],
@@ -296,7 +303,7 @@ var tests = {
loadplugins: {},
macros: {
multiOutput: [""],
- completeions: [""]
+ completions: [""]
},
map: {
multiOutput: ["", "i"],
@@ -313,7 +320,7 @@ var tests = {
"-mode=some-nonexistent-mode <C-a> <C-a>",
"-gtroup=some-nonexistent-group <C-a> <C-a>"
],
- completeions: [
+ completions: [
["", hasItems],
["-", hasItems],
["-mode=ex ", hasItems],
@@ -326,7 +333,7 @@ var tests = {
},
mapclear: {
noOutput: [""],
- completeions: [""]
+ completions: [""]
},
mapgroup: {
multiOutput: [""],
@@ -340,7 +347,7 @@ var tests = {
"some-nonexistent-group",
"foo -d='foo group' -nopersist 'bar.com,http://bar/*,http://bar,^http:'"
],
- completeions: [
+ completions: [
"",
"foo "
],
@@ -349,13 +356,13 @@ var tests = {
mark: {
error: ["", "#", "xy"],
noOutput: ["y"],
- completeions: [""]
+ completions: [""]
},
marks: {
init: ["delmarks q"],
multiOutput: ["", "y"],
error: ["q", "#"],
- completeions: [""]
+ completions: [""]
},
messages: {
anyOutput: ["messages"]
@@ -370,7 +377,7 @@ var tests = {
"! some-nonexistent-rc.penta"
],
error: ["some-nonexistent-rc.penta"],
- completeions: [""],
+ completions: [""],
cleanup: ["silent !rm some-nonexistent-rc.penta"]
},
mksyntax: {
@@ -384,7 +391,7 @@ var tests = {
"some-nonexistent-pentadactyl-dir/",
"some-nonexistent-pentadactyl-dir/foo.vim"
],
- completeions: [
+ completions: [
["", hasItems]
],
cleanup: ["silent !rm -r some-nonexistent-pentadactyl-dir/"]
@@ -469,7 +476,7 @@ var tests = {
"some-nonexistent/good.js",
"some-nonexistent/good.penta"
],
- errors: [
+ error: [
"some-nonexistent/bad.js",
"some-nonexistent/bad.penta"
],
@@ -556,7 +563,7 @@ var tests = {
".pentadactyl/some-nonexistent/good.js",
".pentadactyl/some-nonexistent/good.penta"
],
- errors: [
+ error: [
"~/.pentadactyl/some-nonexistent/bad.js",
"~/.pentadactyl/some-nonexistent/bad.penta",
"./.pentadactyl/some-nonexistent/bad.js",