update
Some checks failed
Continuous Integration / Build and Test on ubuntu-latest (push) Failing after 40s
Some checks failed
Continuous Integration / Build and Test on ubuntu-latest (push) Failing after 40s
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use codebase_to_prompt::{Config, Format, run};
|
||||
use codebase_to_prompt::{run, Config, Format};
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -18,7 +18,7 @@ fn test_run_with_markdown_format() {
|
||||
line_numbers: false,
|
||||
ignore_hidden: true,
|
||||
respect_gitignore: true,
|
||||
relative_path: false,
|
||||
relative_path: true,
|
||||
};
|
||||
|
||||
let result = run(config);
|
||||
@@ -76,7 +76,13 @@ fn test_run_with_git_hash_append() {
|
||||
let result = run(config);
|
||||
assert!(result.is_ok());
|
||||
|
||||
let output_file_name = output_file.file_name().unwrap().to_str().unwrap();
|
||||
assert!(output_file_name.contains("output"));
|
||||
assert!(output_file_name.len() > "output".len());
|
||||
let hashed_file = fs::read_dir(temp_dir.path())
|
||||
.unwrap()
|
||||
.filter_map(|e| e.ok())
|
||||
.find(|e| {
|
||||
let name = e.file_name();
|
||||
let name = name.to_string_lossy();
|
||||
name.starts_with("output_") && name.ends_with(".txt")
|
||||
});
|
||||
assert!(hashed_file.is_some(), "expected output file with git hash suffix");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user