Move Geary.JS package into client as Util.JS
The only reason it was in the engine was so it could be used by both the client and the web extension, without worrying about the webkit2gtk and webkit2gtk_web_extension packages conflicting. However it didn't really belong there, and added a dependency for the engine on javascriptcoregtk which doesn't belong. So this fixes all that.
This commit is contained in:
parent
6f1834d696
commit
da6ac828bd
17 changed files with 158 additions and 142 deletions
24
test/client/util/util-js-test.vala
Normal file
24
test/client/util/util-js-test.vala
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright 2017 Michael Gratton <mike@vee.net>
|
||||
*
|
||||
* This software is licensed under the GNU Lesser General Public License
|
||||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class Util.JS.Test : TestCase {
|
||||
|
||||
public Test() {
|
||||
base("Util.JS.Test");
|
||||
add_test("escape_string", escape_string);
|
||||
}
|
||||
|
||||
public void escape_string() throws Error {
|
||||
assert(Util.JS.escape_string("\n") == """\n""");
|
||||
assert(Util.JS.escape_string("\r") == """\r""");
|
||||
assert(Util.JS.escape_string("\t") == """\t""");
|
||||
assert(Util.JS.escape_string("\'") == """\'""");
|
||||
assert(Util.JS.escape_string("\"") == """\"""");
|
||||
|
||||
assert(Util.JS.escape_string("something…\n") == """something…\n""");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue