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)); |
} |