From 75c89c3e5ea4b4b6a47a3c13aec8b3ac5c324fa5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Jan 2023 16:34:37 +0100 Subject: [PATCH] Add test for OutputsSpec::Names From @Ericson2314. --- src/libstore/tests/outputs-spec.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libstore/tests/outputs-spec.cc b/src/libstore/tests/outputs-spec.cc index c9c2cafd0..836ba7e82 100644 --- a/src/libstore/tests/outputs-spec.cc +++ b/src/libstore/tests/outputs-spec.cc @@ -40,6 +40,13 @@ TEST(OutputsSpec, names_out) { ASSERT_EQ(expected.to_string(), str); } +TEST(OutputsSpec, names_underscore) { + std::string_view str = "a_b"; + OutputsSpec expected = OutputsSpec::Names { "a_b" }; + ASSERT_EQ(OutputsSpec::parse(str), expected); + ASSERT_EQ(expected.to_string(), str); +} + TEST(OutputsSpec, names_out_bin) { OutputsSpec expected = OutputsSpec::Names { "out", "bin" }; ASSERT_EQ(OutputsSpec::parse("out,bin"), expected);