aboutsummaryrefslogtreecommitdiffstats
path: root/tests/generate-command.bats
blob: 5dcc5121168adc38dec054a16ca7bf7aca98af40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@test "Exec command is properly extracted from Firefox desktop file" {
  run ../sway-launcher-desktop.sh generate-command data/desktop-files/0/applications/firefox.desktop
  [ "$status" -eq 0 ]
  [[ "$output" ==  '/usr/lib/firefox/firefox' ]]
}

@test "Exec command is properly generated from htop desktop file" {
  run ../sway-launcher-desktop.sh generate-command data/desktop-files/0/applications/htop.desktop
  [ "$status" -eq 0 ]
  [[ "$output" ==  'termite -e htop' ]]
}

@test "Exec command is properly generated from minecraft-launcher desktop file" {
  run ../sway-launcher-desktop.sh generate-command data/desktop-files/0/applications/minecraft-launcher.desktop
  [ "$status" -eq 0 ]
  [[ "$output" ==  'cd /opt/minecraft-launcher/ && env GDK_BACKEND=x11 /opt/minecraft-launcher/minecraft-launcher' ]]
}