Skip to content
Myr

Use printf in a test rather than echo -n

Before adoption: this commit came in with the history the project adopted, so no landing records it.

echo -n is not POSIX compliant, and this came up while running tests on Illumos.

authored by Neal S · committed by Neal S · parent 56ca42a · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • tests:+3 added−1 removed

1 file+3 added−1 removed

modified:tests/tests.rs+3 added-1 removed
1811 unmodified lines
1812 .1813 e1 e2",1814 );18151816 // We use printf here because we need to suppress a newline and1817 // echo -n is not POSIX-compliant.1818 te.assert_output(1819 &[1818 "foo", "--exec", "echo", "-n", "{/}: ", ";", "--exec", "echo", "{//}",1820 "foo", "--exec", "printf", "%s", "{/}: ", ";", "--exec", "printf", "%s\\n", "{//}",1821 ],1822 "a.foo: .1823 b.foo: ./one1824 C.Foo2: ./one/two
872 unmodified lines