aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Meißelbach <arbelzapf@gmail.com>2020-06-22 22:57:16 +0200
committerMoritz Meißelbach <arbelzapf@gmail.com>2020-06-22 22:57:16 +0200
commitfe41442f90cb53274540e159f7cfbda4335a5841 (patch)
tree0dcceaf3737a2645a22b8bd9899920c3455872e4
parente96f2cafdc48ad16fdd3427a9d13ae1d2e86b042 (diff)
downloadsway-launcher-desktop-fe41442f90cb53274540e159f7cfbda4335a5841.tar.gz
sway-launcher-desktop-fe41442f90cb53274540e159f7cfbda4335a5841.zip
#23 add (failing) test case for this PR
-rw-r--r--tests/data/desktop-files/0/applications/Sid Meier's Civilization IV.desktop8
-rw-r--r--tests/describe.bats7
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/data/desktop-files/0/applications/Sid Meier's Civilization IV.desktop b/tests/data/desktop-files/0/applications/Sid Meier's Civilization IV.desktop
new file mode 100644
index 0000000..aac8eff
--- /dev/null
+++ b/tests/data/desktop-files/0/applications/Sid Meier's Civilization IV.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Sid Meier's Civilization IV
+Comment=Official Minecraft Launcher
+Exec=echo foo
+Terminal=false
+Categories=Game;Application; \ No newline at end of file
diff --git a/tests/describe.bats b/tests/describe.bats
index 1541974..00aa3dc 100644
--- a/tests/describe.bats
+++ b/tests/describe.bats
@@ -5,6 +5,13 @@
[[ ${lines[1]} =~ "Browse the World Wide Web" ]]
}
+@test "Desktop file names containing single quotes can be processed" {
+ run env XDG_CONFIG_HOME=./data/config ../sway-launcher-desktop.sh describe desktop "./data/desktop-files/0/applications/Sid Meier's Civilization IV.desktop"
+ [ "$status" -eq 0 ]
+ [[ ${lines[0]} =~ "Firefox" ]]
+ [[ ${lines[1]} =~ "Browse the World Wide Web" ]]
+}
+
@test "Name and description of ls command should be given" {
run env XDG_CONFIG_HOME=./data/config ../sway-launcher-desktop.sh describe command ls
[ "$status" -eq 0 ]