| 1 |
# Copyright (c) Alexei Znamensky ([email protected]) |
| 2 |
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 3 |
# SPDX-License-Identifier: GPL-3.0-or-later |
| 4 |
|
| 5 |
--- |
| 6 |
anchors: |
| 7 |
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true} |
| 8 |
out: &version-output | |
| 9 |
xfconf-query 4.18.1 |
| 10 |
|
| 11 |
Copyright (c) 2008-2023 |
| 12 |
The Xfce development team. All rights reserved. |
| 13 |
|
| 14 |
Please report bugs to <https://gitlab.xfce.org/xfce/xfconf>. |
| 15 |
test_cases: |
| 16 |
- id: test_simple_property_get |
| 17 |
input: |
| 18 |
channel: xfwm4 |
| 19 |
property: /general/inactive_opacity |
| 20 |
output: |
| 21 |
value: '100' |
| 22 |
is_array: false |
| 23 |
version: 4.18.1 |
| 24 |
mocks: |
| 25 |
run_command: |
| 26 |
- command: [/testbin/xfconf-query, --version] |
| 27 |
environ: *env-def |
| 28 |
rc: 0 |
| 29 |
out: *version-output |
| 30 |
err: '' |
| 31 |
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/inactive_opacity] |
| 32 |
environ: *env-def |
| 33 |
rc: 0 |
| 34 |
out: "100\n" |
| 35 |
err: '' |
| 36 |
- id: test_simple_property_get_nonexistent |
| 37 |
input: |
| 38 |
channel: xfwm4 |
| 39 |
property: /general/i_dont_exist |
| 40 |
output: |
| 41 |
version: 4.18.1 |
| 42 |
mocks: |
| 43 |
run_command: |
| 44 |
- command: [/testbin/xfconf-query, --version] |
| 45 |
environ: *env-def |
| 46 |
rc: 0 |
| 47 |
out: *version-output |
| 48 |
err: '' |
| 49 |
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/i_dont_exist] |
| 50 |
environ: *env-def |
| 51 |
rc: 1 |
| 52 |
out: '' |
| 53 |
err: Property "/general/i_dont_exist" does not exist on channel "xfwm4".\n |
| 54 |
- id: test_property_no_channel |
| 55 |
input: |
| 56 |
property: /general/i_dont_exist |
| 57 |
output: |
| 58 |
failed: true |
| 59 |
msg: "missing parameter(s) required by 'property': channel" |
| 60 |
- id: test_property_get_array |
| 61 |
input: |
| 62 |
channel: xfwm4 |
| 63 |
property: /general/workspace_names |
| 64 |
output: |
| 65 |
is_array: true |
| 66 |
value_array: [Main, Work, Tmp] |
| 67 |
version: 4.18.1 |
| 68 |
mocks: |
| 69 |
run_command: |
| 70 |
- command: [/testbin/xfconf-query, --version] |
| 71 |
environ: *env-def |
| 72 |
rc: 0 |
| 73 |
out: *version-output |
| 74 |
err: '' |
| 75 |
- command: [/testbin/xfconf-query, --channel, xfwm4, --property, /general/workspace_names] |
| 76 |
environ: *env-def |
| 77 |
rc: 0 |
| 78 |
out: "Value is an array with 3 items:\n\nMain\nWork\nTmp\n" |
| 79 |
err: '' |
| 80 |
- id: get_channels |
| 81 |
input: {} |
| 82 |
output: |
| 83 |
channels: [a, b, c] |
| 84 |
version: 4.18.1 |
| 85 |
mocks: |
| 86 |
run_command: |
| 87 |
- command: [/testbin/xfconf-query, --version] |
| 88 |
environ: *env-def |
| 89 |
rc: 0 |
| 90 |
out: *version-output |
| 91 |
err: '' |
| 92 |
- command: [/testbin/xfconf-query, --list] |
| 93 |
environ: *env-def |
| 94 |
rc: 0 |
| 95 |
out: "Channels:\n a\n b\n c\n" |
| 96 |
err: '' |
| 97 |
- id: get_properties |
| 98 |
input: |
| 99 |
channel: xfwm4 |
| 100 |
output: |
| 101 |
properties: |
| 102 |
- /general/wrap_cycle |
| 103 |
- /general/wrap_layout |
| 104 |
- /general/wrap_resistance |
| 105 |
- /general/wrap_windows |
| 106 |
- /general/wrap_workspaces |
| 107 |
- /general/zoom_desktop |
| 108 |
version: 4.18.1 |
| 109 |
mocks: |
| 110 |
run_command: |
| 111 |
- command: [/testbin/xfconf-query, --version] |
| 112 |
environ: *env-def |
| 113 |
rc: 0 |
| 114 |
out: *version-output |
| 115 |
err: '' |
| 116 |
- command: [/testbin/xfconf-query, --list, --channel, xfwm4] |
| 117 |
environ: *env-def |
| 118 |
rc: 0 |
| 119 |
out: | |
| 120 |
/general/wrap_cycle |
| 121 |
/general/wrap_layout |
| 122 |
/general/wrap_resistance |
| 123 |
/general/wrap_windows |
| 124 |
/general/wrap_workspaces |
| 125 |
/general/zoom_desktop |
| 126 |
err: '' |