summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-02-18 09:53:51 +0000
committerLars Wirzenius <liw@liw.fi>2021-02-18 09:53:51 +0000
commitf4ee878cbb074cb075381cb89e74fa1f1d7d2f6c (patch)
treed8fc3606b7e6310759d16bad0c464c5612e055ee
parentd72c1fa565cf1565f9c0e6e355ab4f4ad22ae0b5 (diff)
parent0ed5b7355a75fc696cd33cff8eaab13637b97803 (diff)
downloadsummain-rs-f4ee878cbb074cb075381cb89e74fa1f1d7d2f6c.tar.gz
Merge branch 'fix' into 'main'
fix: drop unwanted empty lines from output See merge request larswirzenius/summain!17
-rw-r--r--src/bin/summain.rs2
-rw-r--r--subplot/summain.py6
2 files changed, 1 insertions, 7 deletions
diff --git a/src/bin/summain.rs b/src/bin/summain.rs
index 20ca738..a2e2b7a 100644
--- a/src/bin/summain.rs
+++ b/src/bin/summain.rs
@@ -11,7 +11,7 @@ fn main() -> anyhow::Result<()> {
opt.pathnames.par_iter().map(|p| manifest(&p)).collect();
for m in v {
let m = m?;
- println!("{}", serde_yaml::to_string(&m)?);
+ print!("{}", serde_yaml::to_string(&m)?);
}
Ok(())
}
diff --git a/subplot/summain.py b/subplot/summain.py
index 0a53b08..4bde65c 100644
--- a/subplot/summain.py
+++ b/subplot/summain.py
@@ -54,12 +54,6 @@ def output_matches_file(ctx, filename=None):
actual = runcmd_get_stdout(ctx)
expected = get_file(filename).decode("UTF-8")
- # For some reason, in CI actual has an extra newline at the end. I have
- # failed to find why. As a workaround, stripping it here.
- if actual.endswith("\n\n"):
- print("FIXME: stripping extra newline from actual output")
- actual = actual[:-1]
-
diff = "".join(
line.rstrip("\n") + "\n"
for line in difflib.unified_diff(