aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/oni-company.bats
blob: 45dd8d6afb75e6d80abd014a02d306dd5544a977 (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
#!/usr/bin/env bats

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

    echo "$output"

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

@test "Loading company diminishes company-mode" {
    run emacs -batch -l package -f package-initialize -l subr-x \
        -l company \
        -eval "(prin1 (string-empty-p (car (alist-get 'company-mode minor-mode-alist))))"

    echo "$output"

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

@test "Reloading company diminishes company-mode" {
    run emacs -batch -l package -f package-initialize -l subr-x \
        -l company \
        -eval "(load-library \"company\")" \
        -eval "(prin1 (string-empty-p (car (alist-get 'company-mode minor-mode-alist))))"

    echo "$output"

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

@test "Loading company-posframe diminishes company-posframe-mode" {
    run emacs -batch -l package -f package-initialize -l subr-x \
        -l company-posframe \
        -eval "(prin1 (string-empty-p (car (alist-get 'company-posframe-mode minor-mode-alist))))"

    echo "$output"

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

@test "Reloading company-posframe diminishes company-posframe-mode" {
    run emacs -batch -l package -f package-initialize -l subr-x \
        -l company-posframe \
        -eval "(load-library \"company-posframe\")" \
        -eval "(prin1 (string-empty-p (car (alist-get 'company-posframe-mode minor-mode-alist))))"

    echo "$output"

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