aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/tests/outputs-spec.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-23 11:47:20 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-23 11:47:20 -0500
commitc67e0cc58c5a74121d74a3f5cf9f9c2199a87093 (patch)
tree79454c245dbb0330b619bc653332077f04d3100b /src/libstore/tests/outputs-spec.cc
parentb3d91239ae9f21a60057b278ceeff663fb786246 (diff)
parent9b56683398de777219627c96be75c0195e630cb7 (diff)
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libstore/tests/outputs-spec.cc')
-rw-r--r--src/libstore/tests/outputs-spec.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libstore/tests/outputs-spec.cc b/src/libstore/tests/outputs-spec.cc
index c9c2cafd0..06e4cabbd 100644
--- a/src/libstore/tests/outputs-spec.cc
+++ b/src/libstore/tests/outputs-spec.cc
@@ -40,6 +40,20 @@ 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_numberic) {
+ std::string_view str = "01";
+ OutputsSpec expected = OutputsSpec::Names { "01" };
+ 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);