aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/oni-gui.bats
blob: f84d391283544918112fbe916fb3f0c00e4f070c (plain)
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
50
51
52
53
54
#!/usr/bin/env bats

@test "Opening emacs loads oni-gui" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (featurep 'oni-gui))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Opening emacs diminishes isearch-mode" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (string= (string ?\s oni-gui-isearch-icon)
                      (car (alist-get 'isearch-mode minor-mode-alist))))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Reloading isearch diminishes isearch-mode" {
    run emacs -batch -l package -f package-initialize \
        -eval "(load-library \"isearch\")" \
        -eval "(prin1 (string= (string ?\s oni-gui-isearch-icon)
                               (car (alist-get 'isearch-mode minor-mode-alist))))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Loading autorevert diminishes auto-revert-mode" {
    run emacs -batch -l package -f package-initialize \
        -l autorevert \
        -eval "(prin1 (string= (string ?\s oni-gui-arev-icon)
                               (car (alist-get 'auto-revert-mode minor-mode-alist))))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Reloading autorevert diminishes auto-revert-mode" {
    run emacs -batch -l package -f package-initialize \
        -l autorevert \
        -eval "(load-library \"autorevert\")" \
        -eval "(prin1 (string= (string ?\s oni-gui-arev-icon)
                               (car (alist-get 'auto-revert-mode minor-mode-alist))))"

    echo "$output"

    [[ "$output" == *"t" ]]
}