From b8ea6e8436889e9f15ab8492ea56d333db7af06e Mon Sep 17 00:00:00 2001 From: Matt Way Date: Thu, 15 Aug 2024 22:44:37 +1000 Subject: [PATCH] Add test files for csv-normaliser script --- csv-normaliser/.vscode/launch.json | 2 +- csv-normaliser/test-input.csv | 30 ++++++++++++++++++++ csv-normaliser/test-media/JaneDoe square.png | 0 csv-normaliser/test-media/Joe Blogs.jpg | 0 csv-normaliser/test-media/LAST_FIRST.jpeg | 0 csv-normaliser/test-output.csv | 4 +++ 6 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 csv-normaliser/test-input.csv create mode 100644 csv-normaliser/test-media/JaneDoe square.png create mode 100644 csv-normaliser/test-media/Joe Blogs.jpg create mode 100644 csv-normaliser/test-media/LAST_FIRST.jpeg create mode 100644 csv-normaliser/test-output.csv diff --git a/csv-normaliser/.vscode/launch.json b/csv-normaliser/.vscode/launch.json index f57f2b9..8e0f9ef 100644 --- a/csv-normaliser/.vscode/launch.json +++ b/csv-normaliser/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "php", "request": "launch", "program": "${workspaceFolder}/main.php", - "args": [], + "args": ["--input", "${workspaceFolder}/test-input.csv", "--media", "${workspaceFolder}/test-media", "--output", "${workspaceFolder}/test-output.csv",], "cwd": "${workspaceFolder}", "port": 9000 } diff --git a/csv-normaliser/test-input.csv b/csv-normaliser/test-input.csv new file mode 100644 index 0000000..22f72f5 --- /dev/null +++ b/csv-normaliser/test-input.csv @@ -0,0 +1,30 @@ +Data for TEST,,,, +Password,,Obtain a password to upload this file from the webmaster of https://streetspeoplelove.org/,, +Your phone number,,"Not for publication, campaign use only",, +Your email,,"Not for publication, campaign use only",, +Ward,BABABI DJINANANG,,, +Candidate,Joe Blogs,4,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Candidate,Jane Doe,Good,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,BOX FOREST,,, +Candidate,First Last,,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,BRUNSWICK WEST,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,BULLEKE-BEK,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,DJIRRI-DJIRRI,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,HARMONY PARK,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,PASCOE VALE SOUTH,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,PENTRIDGE,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,RANDAZZO,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,WARRK-WARRK,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " +Ward,WESTBREEN,,, +Candidate, example name,score,Party or Independent,"replace ""example name"" with a candidate's name. Score should be an integer from 0 to your highest score. Make more of these rows as required. " + ,,,, +Get help filling in this form email webmaster@streetspeoplelove.org,,,, diff --git a/csv-normaliser/test-media/JaneDoe square.png b/csv-normaliser/test-media/JaneDoe square.png new file mode 100644 index 0000000..e69de29 diff --git a/csv-normaliser/test-media/Joe Blogs.jpg b/csv-normaliser/test-media/Joe Blogs.jpg new file mode 100644 index 0000000..e69de29 diff --git a/csv-normaliser/test-media/LAST_FIRST.jpeg b/csv-normaliser/test-media/LAST_FIRST.jpeg new file mode 100644 index 0000000..e69de29 diff --git a/csv-normaliser/test-output.csv b/csv-normaliser/test-output.csv new file mode 100644 index 0000000..90fbd51 --- /dev/null +++ b/csv-normaliser/test-output.csv @@ -0,0 +1,4 @@ +Ward,"Candidate Name",Rating,Picture +"Bababi Djinanang","Joe Blogs",4,"Joe Blogs.jpg" +"Bababi Djinanang","Jane Doe",Good,"JaneDoe square.png" +"Box Forest","First Last",,LAST_FIRST.jpeg