update: Strict ordering for outpu (use BTreeMap instead of HashMap)

This commit is contained in:
Wataru Otsubo 2024-07-21 20:29:42 +09:00
parent c4dd4161c7
commit bdb415e6e6
3 changed files with 68 additions and 24 deletions

View file

@ -1,5 +1,9 @@
mod integrated_test {
use std::path::PathBuf;
use std::{
fs::File,
io::{BufRead, BufReader},
path::PathBuf,
};
use anyhow::Result;
use assert_cmd::{assert::OutputAssertExt, Command};
@ -19,6 +23,15 @@ mod integrated_test {
.success()
.stdout(predicate::str::contains("Creating new file"));
// check output
{
let f = File::open(test_out.clone())?;
let r = BufReader::new(f);
assert!(r
.lines()
.any(|line| { line.unwrap().contains("8868,,A-0-1,0,1,1,0,1,8,1,") }));
}
// 2nd file
let mut cmd = Command::cargo_bin("psb-qaqc-parse")?;
cmd.current_dir("tests")