aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 06:25:03 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 06:25:03 +0900
commit6dd09abb33d86e1aa737667f9e15a18ed41d52e1 (patch)
tree83f961fb8657c3b5c8440caecaf61a52fdc3a2de /crates/shirabe/tests
parent880a5eaad9dcdfd31563385f11ba1f63d38cfd14 (diff)
downloadphp-shirabe-6dd09abb33d86e1aa737667f9e15a18ed41d52e1.tar.gz
php-shirabe-6dd09abb33d86e1aa737667f9e15a18ed41d52e1.tar.zst
php-shirabe-6dd09abb33d86e1aa737667f9e15a18ed41d52e1.zip
refactor(external-packages): test for Windows with cfg!(windows)
MAIN_SEPARATOR is the path separator; PHP's `'\\' === DIRECTORY_SEPARATOR` uses it as an OS test only because PHP has no dedicated one. cfg!(windows) says what the branch actually selects on, and leaves MAIN_SEPARATOR to the sites that really join or split paths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests')
-rw-r--r--crates/shirabe/tests/util/platform_test.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe/tests/util/platform_test.rs b/crates/shirabe/tests/util/platform_test.rs
index 97ab0bbe..6c941ab2 100644
--- a/crates/shirabe/tests/util/platform_test.rs
+++ b/crates/shirabe/tests/util/platform_test.rs
@@ -31,6 +31,6 @@ fn test_expand_path() {
#[test]
fn test_is_windows() {
// Compare 2 common tests for Windows to the built-in Windows test
- assert_eq!(std::path::MAIN_SEPARATOR == '\\', Platform::is_windows());
+ assert_eq!(cfg!(windows), Platform::is_windows());
assert_eq!(defined("PHP_WINDOWS_VERSION_MAJOR"), Platform::is_windows());
}