gobject: bindtests: gjs exception behaviour changed, fix test.

When libguestfs calls 'error (g, "error")', gjs in F17 throws
error.message == "Error invoking Guestfs.test0rinterr: error"

In F18, error.message is simply the string "error".

Fix the test so it works for both cases.
(cherry picked from commit 6afb7336e3)
This commit is contained in:
Richard W.M. Jones
2012-06-27 10:54:02 +01:00
parent c2a3fedb7f
commit 79aec9b58c

View File

@@ -26,7 +26,7 @@ function check_error(f) {
g[f]();
} catch (error) {
threw = true;
if (!error.message.match(/: error$/)) {
if (!error.message.match(/error$/)) {
print(f + " threw unexpected error: " + error.message);
fail = true;
}