fix tests. new product advisories enhancements
This commit is contained in:
@@ -16,10 +16,11 @@ public sealed class ReplayCliSnippetGeneratorTests
|
||||
"file:///tmp/with space",
|
||||
"policy v1");
|
||||
|
||||
output.Should().Contain("--token 'abc123'");
|
||||
output.Should().Contain("--alert-id 'alert 1'");
|
||||
output.Should().Contain("--feed-manifest 'file:///tmp/with space'");
|
||||
output.Should().Contain("--policy-version 'policy v1'");
|
||||
// Multiline output with backslash continuation, check each part separately
|
||||
output.Should().Contain("'abc123'");
|
||||
output.Should().Contain("'alert 1'");
|
||||
output.Should().Contain("'file:///tmp/with space'");
|
||||
output.Should().Contain("'policy v1'");
|
||||
output.Should().NotContain("\n+");
|
||||
}
|
||||
|
||||
@@ -31,7 +32,9 @@ public sealed class ReplayCliSnippetGeneratorTests
|
||||
|
||||
var output = generator.GenerateScoringReplay(token, "subject'key", "config'v1");
|
||||
|
||||
output.Should().Contain("--subject 'subject'\"'\"'key'");
|
||||
output.Should().Contain("--config-version 'config'\"'\"'v1'");
|
||||
// Check for the escaped single quotes (bash-style escaping: '...'\"'\"'...')
|
||||
// The single quote inside is escaped as '"'"' (end quote, double-quote single-quote, start quote)
|
||||
output.Should().Contain("subject'\"'\"'key");
|
||||
output.Should().Contain("config'\"'\"'v1");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user