From 5f0c90518aee4efc1a8dd829571d58b848f55c9d Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:39:17 -0500 Subject: [PATCH] tests: adjust `template` tests to take into account subdir distribution --- tests/test_template.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_template.rs b/tests/test_template.rs index a3c45e34b..b6618cbeb 100644 --- a/tests/test_template.rs +++ b/tests/test_template.rs @@ -276,8 +276,8 @@ fn template_output_directory() { wrk.assert_success(&mut cmd); // Check that files were created with default ROWNO naming - let file1 = wrk.read_to_string(&format!("{outdir}/1.txt")); - let file2 = wrk.read_to_string(&format!("{outdir}/2.txt")); + let file1 = wrk.read_to_string(&format!("{outdir}/0/1.txt")); + let file2 = wrk.read_to_string(&format!("{outdir}/0/2.txt")); assert_eq!(file1, "Hello John from New York!"); assert_eq!(file2, "Hello Jane from Boston!"); @@ -301,8 +301,8 @@ fn template_output_custom_filename() { wrk.assert_success(&mut cmd); // Check that files were created with custom naming - let file1 = wrk.read_to_string(&format!("{outdir}/John_greeting-1.txt")); - let file2 = wrk.read_to_string(&format!("{outdir}/Jane_greeting-2.txt")); + let file1 = wrk.read_to_string(&format!("{outdir}/0/John_greeting-1.txt")); + let file2 = wrk.read_to_string(&format!("{outdir}/0/Jane_greeting-2.txt")); assert_eq!(file1, "Greetings from New York!"); assert_eq!(file2, "Greetings from Boston!"); @@ -325,8 +325,8 @@ fn template_output_directory_no_headers() { wrk.assert_success(&mut cmd); // Check files with row numbers - let file1 = wrk.read_to_string(&format!("{outdir}/1.txt")); - let file2 = wrk.read_to_string(&format!("{outdir}/2.txt")); + let file1 = wrk.read_to_string(&format!("{outdir}/0/1.txt")); + let file2 = wrk.read_to_string(&format!("{outdir}/0/2.txt")); assert_eq!(file1, "Record: John - New York"); assert_eq!(file2, "Record: Jane - Boston");