Systemd/test/test-execute/exec-passenvironment-repeated.service
Filipe Brandenburger 9b796f3523 test-execute: Introduce tests for environment values containing newlines
Also fix one case where the presence of a newline was used to generate
an invalid environment assignment.

Tested: with mkosi, which builds the local tree and run ninja tests.
2018-03-16 16:31:17 -07:00

10 lines
322 B
Desktop File

[Unit]
Description=Test for PassEnvironment with a variable name repeated
[Service]
ExecStart=/bin/sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline"'
Type=oneshot
PassEnvironment=VAR1 VAR2
PassEnvironment=VAR1 VAR3
PassEnvironment=VAR1 VAR4