diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-01-18 16:34:37 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-01-18 16:34:37 +0100 |
commit | 75c89c3e5ea4b4b6a47a3c13aec8b3ac5c324fa5 (patch) | |
tree | 62a0f0e72ddd5cfa260bc16bbbefa6b7ab9e1cdf | |
parent | 8a3b30822b7c5bd33169ad986c39740b4ec7758a (diff) |
Add test for OutputsSpec::Names
From @Ericson2314.
-rw-r--r-- | src/libstore/tests/outputs-spec.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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); |