refactor: update Config to support multiple directories and add relative path option
Some checks failed
Continuous Integration / Build and Test on ubuntu-latest (push) Failing after 1m27s

This commit is contained in:
2025-09-20 11:54:39 +02:00
parent 935f700e7e
commit e06752f625
5 changed files with 81 additions and 36 deletions

View File

@@ -8,7 +8,7 @@ fn test_run_with_markdown_format() {
let output_file = temp_dir.path().join("output.md");
let config = Config {
directory: PathBuf::from("tests/fixtures"),
directory: vec![PathBuf::from("tests/fixtures")],
output: Some(output_file.clone()),
include: vec!["rs".to_string()],
exclude: vec![],
@@ -18,6 +18,7 @@ fn test_run_with_markdown_format() {
line_numbers: false,
ignore_hidden: true,
respect_gitignore: true,
relative_path: false,
};
let result = run(config);
@@ -33,7 +34,7 @@ fn test_run_with_text_format() {
let output_file = temp_dir.path().join("output.txt");
let config = Config {
directory: PathBuf::from("tests/fixtures"),
directory: vec![PathBuf::from("tests/fixtures")],
output: Some(output_file.clone()),
include: vec!["txt".to_string()],
exclude: vec![],
@@ -43,6 +44,7 @@ fn test_run_with_text_format() {
line_numbers: true,
ignore_hidden: true,
respect_gitignore: true,
relative_path: false,
};
let result = run(config);
@@ -58,7 +60,7 @@ fn test_run_with_git_hash_append() {
let output_file = temp_dir.path().join("output.txt");
let config = Config {
directory: PathBuf::from("tests/fixtures"),
directory: vec![PathBuf::from("tests/fixtures")],
output: Some(output_file.clone()),
include: vec!["txt".to_string()],
exclude: vec![],
@@ -68,6 +70,7 @@ fn test_run_with_git_hash_append() {
line_numbers: false,
ignore_hidden: true,
respect_gitignore: true,
relative_path: false,
};
let result = run(config);