File tree Expand file tree Collapse file tree 8 files changed +27
-18
lines changed
Expand file tree Collapse file tree 8 files changed +27
-18
lines changed Original file line number Diff line number Diff line change 3131in
3232pkgs . runCommand "ghostty" { } ''
3333 "${ ghosttyWrapped } /bin/ghostty" +validate-config
34- " $ {ghosttyWrapped } /bin/ghostty" +version | grep -q "${ ghosttyWrapped . version } "
34+ [[ "$( $ {ghosttyWrapped } /bin/ghostty +version)" == * "${ ghosttyWrapped . version } "* ]]
3535
3636 "${ ghosttyFileWrapped } /bin/ghostty" +validate-config
3737
Original file line number Diff line number Diff line change 1717
1818in
1919pkgs . runCommand "git-test" { } ''
20- " $ {gitWrapped } /bin/git" --version | grep -q " git"
20+ [[ "$( $ {gitWrapped } /bin/git --version)" == * git* ]]
2121 touch $out
2222''
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ pkgs.runCommand "i3-test" { nativeBuildInputs = [ pkgs.dbus ]; } ''
2424 dbus-daemon --session --address="$DBUS_SESSION_BUS_ADDRESS" --nofork --nopidfile --print-address &
2525 DBUS_PID=$!
2626
27- " $ {i3Wrapped } /bin/i3" --version | grep -q "${ i3Wrapped . version } "
27+ [[ "$( $ {i3Wrapped } /bin/i3 --version)" == * "${ i3Wrapped . version } "* ]]
2828
2929 kill $DBUS_PID 2>/dev/null || true
3030
Original file line number Diff line number Diff line change 1616 } ) . wrapper ;
1717in
1818pkgs . runCommand "jujutsu-test" { } ''
19- "${ jujutsuWrapped } /bin/jj" config list --user | grep -q 'user.name = "Test User"'
20- "${ jujutsuWrapped } /bin/jj" config list --user | grep -q 'user.email = "test@example.com"'
19+ config_list="$(${ jujutsuWrapped } /bin/jj config list --user)"
20+ [[ "$config_list" == *'user.name = "Test User"'* ]]
21+ [[ "$config_list" == *'user.email = "test@example.com"'* ]]
2122 touch $out
2223''
Original file line number Diff line number Diff line change 44} :
55
66let
7- kanshiWrapped =
8- ( self . wrapperModules . kanshi . apply {
9- inherit pkgs ;
7+ kanshiApplied = self . wrapperModules . kanshi . apply {
8+ inherit pkgs ;
109
11- configFile . content = ''
12- profile {
13- output eDP-1 enable scale 2
14- }
15- '' ;
10+ configFile . content = ''
11+ profile {
12+ output eDP-1 enable scale 2
13+ }
14+ '' ;
15+ } ;
1616
17- } ) . wrapper ;
17+ kanshiWrapped = kanshiApplied . wrapper ;
18+ kanshiConfigPath = toString kanshiApplied . config . configFile . path ;
1819
1920in
2021pkgs . runCommand "kanshi-test" { } ''
22+ help_output="$(${ kanshiWrapped } /bin/kanshi --help 2>&1)"
23+ [[ "$help_output" == *config* ]]
2124
22- "${ kanshiWrapped } /bin/kanshi" --help 2>&1 | grep -q "config"
25+ test -f "${ kanshiConfigPath } "
26+ grep -qF 'output eDP-1 enable scale 2' "${ kanshiConfigPath } "
27+
28+ wrapper_script=$(<"${ kanshiWrapped } /bin/kanshi")
29+ [[ "$wrapper_script" == *"--config"* ]]
30+ [[ "$wrapper_script" == *"${ kanshiConfigPath } "* ]]
2331
2432 touch $out
2533''
Original file line number Diff line number Diff line change 1515
1616in
1717pkgs . runCommand "mpv-test" { } ''
18- " $ {mpvWrapped } /bin/mpv" --version | grep -q " mpv"
18+ [[ "$( $ {mpvWrapped } /bin/mpv --version)" == * mpv* ]]
1919 touch $out
2020''
Original file line number Diff line number Diff line change 111111in
112112pkgs . runCommand "niri-test" { } ''
113113 cat ${ niriWrapped } /bin/niri
114- " $ {niriWrapped } /bin/niri" --version | grep -q "${ niriWrapped . version } "
114+ [[ "$( $ {niriWrapped } /bin/niri --version)" == * "${ niriWrapped . version } "* ]]
115115 "${ niriWrapped } /bin/niri" validate
116116 # since config is now checked at build time, testing a bad config is impossible
117117 touch $out
Original file line number Diff line number Diff line change 1616 } ) . wrapper ;
1717in
1818pkgs . runCommand "udiskie-test" { } ''
19- " $ {udiskieWrapped } /bin/udiskie" --version | grep -q " udiskie"
19+ [[ "$( $ {udiskieWrapped } /bin/udiskie --version)" == * udiskie* ]]
2020 touch $out
2121''
You can’t perform that action at this time.
0 commit comments