2019-04-21 11:13:01 +10:00
|
|
|
/*
|
|
|
|
|
* Copyright 2019 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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2019-11-13 10:54:11 +11:00
|
|
|
class Application.ClientTest : TestCase {
|
2019-04-21 11:13:01 +10:00
|
|
|
|
|
|
|
|
|
2019-11-13 10:54:11 +11:00
|
|
|
private Client? test_article = null;
|
2019-04-21 11:13:01 +10:00
|
|
|
|
|
|
|
|
|
2019-11-13 10:54:11 +11:00
|
|
|
public ClientTest() {
|
|
|
|
|
base("Application.ClientTest");
|
2019-04-21 11:13:01 +10:00
|
|
|
add_test("paths_when_installed", paths_when_installed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void set_up() {
|
2019-11-13 10:54:11 +11:00
|
|
|
this.test_article = new Client();
|
2019-04-21 11:13:01 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void tear_down() {
|
|
|
|
|
this.test_article = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void paths_when_installed() throws GLib.Error {
|
|
|
|
|
string[] args = new string[] {
|
|
|
|
|
_INSTALL_PREFIX + "/bin/geary",
|
2019-05-22 20:47:08 +00:00
|
|
|
// Specify this so the app doesn't actually attempt
|
2019-04-21 11:13:01 +10:00
|
|
|
// to start up
|
|
|
|
|
"-v"
|
|
|
|
|
};
|
|
|
|
|
unowned string[] unowned_args = args;
|
|
|
|
|
int status;
|
|
|
|
|
this.test_article.local_command_line(ref unowned_args, out status);
|
|
|
|
|
|
|
|
|
|
assert_string(
|
|
|
|
|
_INSTALL_PREFIX + "/share/geary",
|
|
|
|
|
this.test_article.get_resource_directory().get_path()
|
|
|
|
|
);
|
|
|
|
|
assert_string(
|
|
|
|
|
_INSTALL_PREFIX + "/share/applications",
|
|
|
|
|
this.test_article.get_desktop_directory().get_path()
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|