File: application-client-test.vala

package info (click to toggle)
geary 46.0-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,084 kB
  • sloc: javascript: 972; ansic: 722; sql: 247; xml: 183; python: 30; makefile: 28; sh: 24
file content (49 lines) | stat: -rw-r--r-- 1,302 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * 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.
 */


class Application.ClientTest : TestCase {


    private Client? test_article = null;


    public ClientTest() {
        base("Application.ClientTest");
        add_test("paths_when_installed", paths_when_installed);
    }

    public override void set_up() {
        this.test_article = new Client();
    }

    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",
            // Specify this so the app doesn't actually attempt
            // to start up
            "-v"
        };
        unowned string[] unowned_args = args;
        int status;
        this.test_article.local_command_line(ref unowned_args, out status);

        assert_equal(
            this.test_article.get_resource_directory().get_path(),
            _INSTALL_PREFIX + "/share/geary"
        );
        assert_equal(
            this.test_article.get_desktop_directory().get_path(),
            _INSTALL_PREFIX + "/share/applications"
        );
    }

}