aboutsummaryrefslogtreecommitdiffstats
path: root/tests/describe.bats
diff options
context:
space:
mode:
authorMoritz Meißelbach <arbelzapf@gmail.com>2019-10-23 22:43:46 +0200
committerMoritz Meißelbach <arbelzapf@gmail.com>2019-10-23 22:43:46 +0200
commit49c1a64d1cc00f3d160e74ea49898e9107eb6486 (patch)
tree840afbddb7182009ab9e9a77b9ad8cbf2e1e1427 /tests/describe.bats
parent18ff43af5474e60dd58205fe614c0253727011e4 (diff)
downloadsway-launcher-desktop-49c1a64d1cc00f3d160e74ea49898e9107eb6486.tar.gz
sway-launcher-desktop-49c1a64d1cc00f3d160e74ea49898e9107eb6486.zip
Introduce Travis CI with shellcheck and BATS
Diffstat (limited to 'tests/describe.bats')
-rw-r--r--tests/describe.bats13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/describe.bats b/tests/describe.bats
new file mode 100644
index 0000000..3285163
--- /dev/null
+++ b/tests/describe.bats
@@ -0,0 +1,13 @@
+@test "Name and description of firefox desktop file are properly extracted" {
+ run ../sway-launcher-desktop.sh describe data/firefox.desktop
+ [ "$status" -eq 0 ]
+ [[ ${lines[0]} =~ "Firefox" ]]
+ [[ ${lines[1]} =~ "Browse the World Wide Web" ]]
+}
+
+@test "Name and description of awk command should be given" {
+ run ../sway-launcher-desktop.sh describe awk command
+ [ "$status" -eq 0 ]
+ [[ ${lines[0]} =~ "awk" ]]
+ [[ ${lines[1]} =~ "pattern scanning and processing language" ]]
+} \ No newline at end of file