diff options
| author | Moritz Meißelbach <arbelzapf@gmail.com> | 2019-10-31 21:40:32 +0100 |
|---|---|---|
| committer | Moritz Meißelbach <arbelzapf@gmail.com> | 2019-10-31 21:40:32 +0100 |
| commit | abcb891359649559981d0ef522ed16ddf2b68908 (patch) | |
| tree | d7777df252c44d1b29ea7474711dce181f5e5c2c /tests/file-id.bats | |
| parent | ac656f120a12e3521c4cabbc96e0363f746193a4 (diff) | |
| download | sway-launcher-desktop-abcb891359649559981d0ef522ed16ddf2b68908.tar.gz sway-launcher-desktop-abcb891359649559981d0ef522ed16ddf2b68908.zip | |
Generate a spec-conformant "desktop file id" of each .desktop file and remove duplicates. This should process user-specific overrides properly #3
Diffstat (limited to 'tests/file-id.bats')
| -rw-r--r-- | tests/file-id.bats | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/file-id.bats b/tests/file-id.bats new file mode 100644 index 0000000..1da4295 --- /dev/null +++ b/tests/file-id.bats @@ -0,0 +1,13 @@ +@test "Firefox desktop file id is properly generated" { + run ../sway-launcher-desktop.sh desktop-file-id data/desktop-files/0/applications/firefox.desktop + echo "EXPECTED: foo-bar.desktop ACTUAL: $output" + [ "$status" -eq 0 ] + [[ "$output" == 'firefox.desktop' ]] +} + +@test "Desktop file id foo-bar.desktop from subdirectory is properly generated" { + run ../sway-launcher-desktop.sh desktop-file-id data/desktop-files/0/applications/foo/bar.desktop + echo "EXPECTED: foo-bar.desktop ACTUAL: $output" + [ "$status" -eq 0 ] + [[ "$output" == 'foo-bar.desktop' ]] +} |
