From 56a0bf185be8404700040c25dc89e62a215a8b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C5=BDoljom?= Date: Tue, 21 May 2024 08:13:44 +0200 Subject: [PATCH] Add additional tests Covers windows backslash file paths. --- tests/Unit/SettingsAddPathsTest.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/Unit/SettingsAddPathsTest.php b/tests/Unit/SettingsAddPathsTest.php index 458a43d2..718e83e7 100644 --- a/tests/Unit/SettingsAddPathsTest.php +++ b/tests/Unit/SettingsAddPathsTest.php @@ -61,13 +61,21 @@ public static function dataAddPaths() ), 'Paths passed on CLI, paths with spaces' => array( 'original' => array('path with/spaces between/1', 'path with/spaces between/subdir/2'), - 'extra' => array('path/1', 'path/subdir/3', 'path/with spaces'), + 'extra' => array( + 'path/1', + 'path/subdir/3', + 'path/with spaces', + 'windows-path\with spaces\and\backslashes', + 'windows path\with spaces\and\backslashes' + ), 'expected' => array( 'path with/spaces between/1', 'path with/spaces between/subdir/2', 'path/1', 'path/subdir/3', - 'path/with spaces' + 'path/with spaces', + 'windows-path\with spaces\and\backslashes', + 'windows path\with spaces\and\backslashes', ), ) );