Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: tools/gn/substitution_writer_unittest.cc

Issue 1868023002: Add GN output prefix override and allow empty output extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/substitution_writer.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/substitution_writer_unittest.cc
diff --git a/tools/gn/substitution_writer_unittest.cc b/tools/gn/substitution_writer_unittest.cc
index 36d027b98978546fb57b4a500b5747973f976def..77374f1a313b39e12aee65a548e2997af82338a6 100644
--- a/tools/gn/substitution_writer_unittest.cc
+++ b/tools/gn/substitution_writer_unittest.cc
@@ -268,4 +268,14 @@ TEST(SubstitutionWriter, LinkerSubstitutions) {
OutputFile output = SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
&target, tool, pattern);
EXPECT_EQ("./libbaz.so", output.value());
+
+ // Output extensions can be overridden.
+ target.set_output_extension("extension");
+ EXPECT_EQ(".extension",
+ SubstitutionWriter::GetLinkerSubstitution(
+ &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
+ target.set_output_extension("");
+ EXPECT_EQ("",
+ SubstitutionWriter::GetLinkerSubstitution(
+ &target, tool, SUBSTITUTION_OUTPUT_EXTENSION));
}
« no previous file with comments | « tools/gn/substitution_writer.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698