tests: change quoting to match new Nixpkgs behavior

Fixes tests that are affected by
<https://github.com/NixOS/nixpkgs/pull/333744>.
This commit is contained in:
Robert Helgesson 2024-09-08 09:55:05 +02:00
parent ec4c6928bb
commit 8a175a8913
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
39 changed files with 58 additions and 58 deletions

View file

@ -9,7 +9,7 @@ fi
# script starts up graphical-session.target.
systemctl --user stop graphical-session.target graphical-session-pre.target
systemctl --user import-environment 'DBUS_SESSION_BUS_ADDRESS' 'DISPLAY' 'SSH_AUTH_SOCK' 'XAUTHORITY' 'XDG_DATA_DIRS' 'XDG_RUNTIME_DIR' 'XDG_SESSION_ID' 'EXTRA_IMPORTED_VARIABLE'
systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID EXTRA_IMPORTED_VARIABLE
profile extra commands

View file

@ -17,4 +17,4 @@ while [ -n "$(systemctl --user --no-legend --state=deactivating list-units)" ];
sleep 0.5
done
systemctl --user unset-environment 'DBUS_SESSION_BUS_ADDRESS' 'DISPLAY' 'SSH_AUTH_SOCK' 'XAUTHORITY' 'XDG_DATA_DIRS' 'XDG_RUNTIME_DIR' 'XDG_SESSION_ID' 'EXTRA_IMPORTED_VARIABLE'
systemctl --user unset-environment DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID EXTRA_IMPORTED_VARIABLE

View file

@ -25,12 +25,12 @@
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
"eval \"\$(@atuin@/bin/atuin init bash '--disable-ctrl-r' '--disable-up-arrow')\""
"eval \"\$(@atuin@/bin/atuin init bash --disable-ctrl-r --disable-up-arrow)\""
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
"eval \"\$(@atuin@/bin/atuin init zsh '--disable-ctrl-r' '--disable-up-arrow')\""
"eval \"\$(@atuin@/bin/atuin init zsh --disable-ctrl-r --disable-up-arrow)\""
assertFileExists home-files/.config/fish/config.fish
assertFileContains \
home-files/.config/fish/config.fish \

View file

@ -35,7 +35,7 @@ with lib;
--map-syntax='*.jenkinsfile:Groovy'
--map-syntax='*.props:Java Properties'
--pager='less -FR'
--theme='TwoDark'
--theme=TwoDark
--show-all
''
}

View file

@ -45,7 +45,7 @@ with lib;
--map-syntax='*.jenkinsfile:Groovy'
--map-syntax='*.props:Java Properties'
--pager='less -FR'
--theme='TwoDark'
--theme=TwoDark
''
}

View file

@ -24,6 +24,6 @@
nmt.script = ''
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
"export BEMENU_OPTS=\"'--ab' '#1e1e2e' '--af' '#cdd6f4' '--fb' '#1e1e2e' '--ff' '#cdd6f4' '--hb' '#1e1e2e' '--hf' '#f9e2af' '--ignorecase' '--line-height' '28' '--nb' '#1e1e2e' '--nf' '#cdd6f4' '--prompt' 'open' '--tb' '#1e1e2e' '--tf' '#f38ba8' '--width-factor' '0.300000'\""
"export BEMENU_OPTS=\"--ab '#1e1e2e' --af '#cdd6f4' --fb '#1e1e2e' --ff '#cdd6f4' --hb '#1e1e2e' --hf '#f9e2af' --ignorecase --line-height 28 --nb '#1e1e2e' --nf '#cdd6f4' --prompt open --tb '#1e1e2e' --tf '#f38ba8' --width-factor 0.300000\""
'';
}

View file

@ -27,7 +27,7 @@
};
nmt.script = ''
assertFileNotRegex activate "^export GNUPGHOME='/home/hm-user/.gnupg'$"
assertFileNotRegex activate "^export GNUPGHOME=/home/hm-user/.gnupg$"
assertFileRegex activate \
'^install -m 0700 /nix/store/[0-9a-z]*-gpg-pubring/trustdb.gpg "/home/hm-user/.gnupg/trustdb.gpg"$'

View file

@ -17,7 +17,7 @@
test.stubs.systemd = { }; # depends on gnupg.override
nmt.script = ''
assertFileContains activate "export GNUPGHOME='/home/hm-user/.gnupg'"
assertFileContains activate "export GNUPGHOME=/home/hm-user/.gnupg"
assertFileContains activate "unset GNUPGHOME QUIET_ARG keyId importTrust"

View file

@ -1,6 +1,6 @@
auto_create_new_mailboxes = true
fqdn = "example.com"
password_command = "'password-command'"
password_command = "password-command"
username = "home.manager"
[tags]

View file

@ -20,7 +20,7 @@ with lib;
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
"alias ls='@pls@/bin/pls'"
"alias ls=@pls@/bin/pls"
assertFileContains \
home-files/.bashrc \
"alias ll='@pls@/bin/pls -d perms -d user -d group -d size -d mtime -d git'"

View file

@ -24,7 +24,7 @@ with lib;
assertFileExists home-files/.config/fish/config.fish
assertFileContains \
home-files/.config/fish/config.fish \
"alias ls '@pls@/bin/pls'"
"alias ls @pls@/bin/pls"
assertFileContains \
home-files/.config/fish/config.fish \
"alias ll '@pls@/bin/pls -d perms -d user -d group -d size -d mtime -d git'"

View file

@ -23,10 +23,10 @@ with lib;
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
"alias -- 'ls'='@pls@/bin/pls'"
"alias -- ls=@pls@/bin/pls"
assertFileContains \
home-files/.zshrc \
"alias -- 'll'='@pls@/bin/pls -d perms -d user -d group -d size -d mtime -d git'"
"alias -- ll='@pls@/bin/pls -d perms -d user -d group -d size -d mtime -d git'"
'';
};
}

View file

@ -16,11 +16,11 @@
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"' '"'"'--enable-experimental-instant-mode'"'"')"'
'eval "$(@thefuck@/bin/thefuck --alias --enable-experimental-instant-mode)"'
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"' '"'"'--enable-experimental-instant-mode'"'"')"'
'eval "$(@thefuck@/bin/thefuck --alias --enable-experimental-instant-mode)"'
'';
}

View file

@ -15,7 +15,7 @@
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"')"'
'eval "$(@thefuck@/bin/thefuck --alias)"'
assertFileExists home-files/.config/fish/functions/fuck.fish
assertFileContains \
@ -33,7 +33,7 @@
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(@thefuck@/bin/thefuck '"'"'--alias'"'"')"'
'eval "$(@thefuck@/bin/thefuck --alias)"'
assertFileExists home-files/.config/nushell/config.nu
assertFileContains \

View file

@ -19,8 +19,8 @@ with lib;
nmt.script = ''
assertFileContains home-files/.zshrc "source ${pkgs.hello}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS+=('brackets' 'pattern' 'cursor')"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES+=('comment' 'fg=#6c6c6c')"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_HIGHLIGHTERS+=(brackets pattern cursor)"
assertFileContains home-files/.zshrc "ZSH_HIGHLIGHT_STYLES+=(comment 'fg=#6c6c6c')"
'';
};
}

View file

@ -12,6 +12,6 @@
abbreviations=home-files/.config/zsh-abbr/user-abbreviations
assertFileExists $abbreviations
assertFileContains $abbreviations "abbr 'ga'='git add'"
assertFileContains $abbreviations "abbr ga='git add'"
'';
}

View file

@ -20,7 +20,7 @@
[Service]
Environment=PATH=@nix@/bin
EnvironmentFile=/home/hm-user/.config/cachix-agent.token
ExecStart='@cachix-agent@/bin/cachix' 'deploy' 'agent' 'test-agent' 'home-manager'
ExecStart=@cachix-agent@/bin/cachix deploy agent test-agent home-manager
KillMode=process
Restart=on-failure

View file

@ -16,9 +16,9 @@
assertFileExists $servicePath/cliphist.service
assertFileExists $servicePath/cliphist-images.service
assertFileRegex $servicePath/cliphist.service " '-max-dedupe-search' '10' "
assertFileRegex $servicePath/cliphist.service " '-max-items' '500' "
assertFileRegex $servicePath/cliphist-images.service " '-max-dedupe-search' '10' "
assertFileRegex $servicePath/cliphist-images.service " '-max-items' '500' "
assertFileRegex $servicePath/cliphist.service " -max-dedupe-search 10 "
assertFileRegex $servicePath/cliphist.service " -max-items 500 "
assertFileRegex $servicePath/cliphist-images.service " -max-dedupe-search 10 "
assertFileRegex $servicePath/cliphist-images.service " -max-items 500 "
'';
}

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target
[Service]
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon '-f' 'exwm-enable'"
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon -f exwm-enable"
Restart=on-failure
SuccessExitStatus=15
Type=notify

View file

@ -2,7 +2,7 @@
WantedBy=default.target
[Service]
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon '-f' 'exwm-enable'"
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon -f exwm-enable"
Restart=on-failure
SuccessExitStatus=15
Type=notify

View file

@ -1,5 +1,5 @@
[Service]
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon='%t/emacs/server' '-f' 'exwm-enable'"
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon=%t/emacs/server -f exwm-enable"
ExecStartPost=@coreutils@/bin/chmod --changes -w %t/emacs
ExecStopPost=@coreutils@/bin/chmod --changes +w %t/emacs
Restart=on-failure

View file

@ -1,5 +1,5 @@
[Service]
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon='%t/emacs/server' '-f' 'exwm-enable'"
ExecStart=@runtimeShell@ -l -c "@emacs@/bin/emacs --fg-daemon=%t/emacs/server -f exwm-enable"
Restart=on-failure
SuccessExitStatus=15
Type=notify

View file

@ -1,6 +1,6 @@
[Service]
BusName=org.freedesktop.Notifications
ExecStart=@fnott@/bin/fnott -c '/home/hm-user/.config/fnott/fnott.ini'
ExecStart=@fnott@/bin/fnott -c /home/hm-user/.config/fnott/fnott.ini
Type=dbus
[Unit]

View file

@ -1 +1 @@
{"boxes":["Inbox"],"host":"imap.example.com","onNewMail":"@notmuch@/bin/notmuch new\n","passwordCmd":"'password-command'","port":993,"tls":true,"tlsOptions":{"starttls":false},"username":"home.manager"}
{"boxes":["Inbox"],"host":"imap.example.com","onNewMail":"@notmuch@/bin/notmuch new\n","passwordCmd":"password-command","port":993,"tls":true,"tlsOptions":{"starttls":false},"username":"home.manager"}

View file

@ -2,7 +2,7 @@
WantedBy=default.target
[Service]
ExecStart=@mpd-mpris@/bin/mpd-mpris -host 'example.com' -network 'tcp' -no-instance -port 1234 -pwd 'my_password'
ExecStart=@mpd-mpris@/bin/mpd-mpris -host example.com -network tcp -no-instance -port 1234 -pwd my_password
Restart=on-failure
RestartSec=5s
Type=simple

View file

@ -3,7 +3,7 @@ WantedBy=default.target
[Service]
Environment=PATH=/home/hm-user/.nix-profile/bin
ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf '--verbose'
ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf --verbose
ExecStartPre=/nix/store/00000000000000000000000000000000-bash/bin/bash -c "/nix/store/00000000000000000000000000000000-coreutils/bin/mkdir -p '/home/hm-user/.local/share/mpd' '/home/hm-user/.local/share/mpd/playlists'"
Type=notify

View file

@ -1,6 +1,6 @@
[Service]
Environment=PATH=/home/hm-user/.nix-profile/bin
ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf '--verbose'
ExecStart=@mpd@/bin/mpd --no-daemon /nix/store/00000000000000000000000000000000-mpd.conf --verbose
ExecStartPre=/nix/store/00000000000000000000000000000000-bash/bin/bash -c "/nix/store/00000000000000000000000000000000-coreutils/bin/mkdir -p '/home/hm-user/.local/share/mpd' '/home/hm-user/.local/share/mpd/playlists'"
Type=notify

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target
[Service]
ExecStart=@parcellite@/bin/parcellite '--no-icon'
ExecStart=@parcellite@/bin/parcellite --no-icon
Restart=on-abort
[Unit]

View file

@ -3,7 +3,7 @@ WantedBy=graphical-session.target
[Service]
Environment=PATH=@paprefs@/bin:@pavucontrol@/bin
ExecStart='@pasystray@/bin/pasystray' '-g'
ExecStart=@pasystray@/bin/pasystray -g
[Unit]
After=graphical-session-pre.target

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target
[Service]
ExecStart=@gammastep@/bin/gammastep '-c' '/home/hm-user/.config/gammastep/config.ini'
ExecStart=@gammastep@/bin/gammastep -c /home/hm-user/.config/gammastep/config.ini
Restart=on-failure
RestartSec=3

View file

@ -2,7 +2,7 @@
WantedBy=graphical-session.target
[Service]
ExecStart=@redshift@/bin/redshift '-c' '/home/hm-user/.config/redshift/redshift.conf'
ExecStart=@redshift@/bin/redshift -c /home/hm-user/.config/redshift/redshift.conf
Restart=on-failure
RestartSec=3

View file

@ -17,7 +17,7 @@
assertFileExists $serviceFile
assertFileRegex $serviceFile 'ExecStart=.*/bin/dummy'
assertFileRegex $serviceFile "dummy '--icon' '--enable-extra-hardening'"
assertFileRegex $serviceFile "dummy --icon --enable-extra-hardening"
mimetypeFile='./home-files/.local/share/mime/packages/application-x-rdp.xml'

View file

@ -2,7 +2,7 @@
WantedBy=default.target
[Service]
ExecStart=/signaturepdf/bin/signaturepdf 9494 '-d' 'upload_max_filesize=24M'
ExecStart=/signaturepdf/bin/signaturepdf 9494 -d 'upload_max_filesize=24M'
[Unit]
Description=signaturepdf; signing, organizing, editing metadatas or compressing PDFs

View file

@ -21,7 +21,7 @@
WantedBy=graphical-session.target
[Service]
ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --style '/etc/xdg/swayosd/style.css' --top-margin 0.100000
ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --style /etc/xdg/swayosd/style.css --top-margin 0.100000
Restart=always
RestartSec=2s
Type=simple

View file

@ -13,7 +13,7 @@ lib.mkMerge [
nmt.script = ''
assertFileExists home-files/.config/systemd/user/syncthing.service
assertFileContains home-files/.config/systemd/user/syncthing.service \
"ExecStart='@syncthing@/bin/syncthing' '-no-browser' '-no-restart' '-logflags=0' '-foo' '-bar \"baz\"'"
"ExecStart=@syncthing@/bin/syncthing -no-browser -no-restart '-logflags=0' -foo '-bar \"baz\"'"
'';
})
(lib.mkIf pkgs.stdenv.isDarwin {

View file

@ -1,14 +1,14 @@
extra config early
if [[ $(bspc query --desktops --names --monitor 'focused') == Desktop ]]; then
bspc monitor 'focused' -d 'desktop 1' 'd'\''esk top'
if [[ $(bspc query --desktops --names --monitor focused) == Desktop ]]; then
bspc monitor focused -d 'desktop 1' 'd'\''esk top'
fi
bspc config 'border_width' '2'
bspc config 'external_rules_command' '/path/to/external rules command'
bspc config 'gapless_monocle' 'on'
bspc config 'ignore_ewmh_fullscreen' 'enter,exit'
bspc config 'split_ratio' '0.520000'
bspc config border_width 2
bspc config external_rules_command '/path/to/external rules command'
bspc config gapless_monocle on
bspc config ignore_ewmh_fullscreen enter,exit
bspc config split_ratio 0.520000
bspc rule -r '*'
bspc rule -a '*' 'center=off' 'desktop=d'\''esk top#next' 'split_dir=north' 'sticky=on' 'unknown_rule=42'

View file

@ -15,18 +15,18 @@ herbstclient mouseunbind --all
herbstclient unrule --all
herbstclient set always_show_frame true
herbstclient set default_frame_layout 'max'
herbstclient set default_frame_layout max
herbstclient set frame_bg_active_color '#000000'
herbstclient set frame_gap '12'
herbstclient set frame_padding '-12'
herbstclient set frame_gap 12
herbstclient set frame_padding -12
for tag in '1' 'with space' 'wə1rd#ch@rs'\'''; do
for tag in 1 'with space' 'wə1rd#ch@rs'\'''; do
herbstclient add "$tag"
done
if @herbstluftwm@/bin/herbstclient object_tree tags.by-name.default &>/dev/null; then
herbstclient use '1'
herbstclient merge_tag default '1'
herbstclient use 1
herbstclient merge_tag default 1
fi

View file

@ -2,7 +2,7 @@
WantedBy=test.target
[Service]
ExecStart=@wlsunset@/bin/wlsunset '-L' '128.8' '-T' '6000' '-g' '0.6' '-l' '12.3' '-t' '3500'
ExecStart=@wlsunset@/bin/wlsunset -L 128.8 -T 6000 -g 0.6 -l 12.3 -t 3500
[Unit]
Description=Day/night gamma adjustments for Wayland compositors.

View file

@ -17,7 +17,7 @@
pkgs.writeText "expected" ''
[Manager]
DefaultCPUAccounting=true
DefaultEnvironment=PATH='/bin:/sbin:/some where' TEST='abc'
DefaultEnvironment=PATH='/bin:/sbin:/some where' TEST=abc
LogLevel=debug
''
}