mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
Add test for OutputsSpec::Names
From @Ericson2314.
(cherry picked from commit 75c89c3e5e
)
This commit is contained in:
parent
3de7107312
commit
be0f37ad7b
1 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,13 @@ TEST(OutputsSpec, names_out) {
|
||||||
ASSERT_EQ(expected.to_string(), str);
|
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) {
|
TEST(OutputsSpec, names_out_bin) {
|
||||||
OutputsSpec expected = OutputsSpec::Names { "out", "bin" };
|
OutputsSpec expected = OutputsSpec::Names { "out", "bin" };
|
||||||
ASSERT_EQ(OutputsSpec::parse("out,bin"), expected);
|
ASSERT_EQ(OutputsSpec::parse("out,bin"), expected);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue