mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[tests] launcher: asserting that directory separators in classpath are platform-specific
GitOrigin-RevId: ef4d9c93fc486b9cff6538f215cab944fe634694
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ec5cc72fb4
commit
9810b8452c
@@ -5,8 +5,8 @@ pub mod utils;
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::{env, fs};
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::{PathBuf, MAIN_SEPARATOR};
|
||||
use xplat_launcher::{get_caches_home, jvm_property};
|
||||
use crate::utils::*;
|
||||
|
||||
@@ -68,6 +68,8 @@ mod tests {
|
||||
assert!(classpath.contains("app.jar"), "app.jar is not present in classpath: {}", classpath);
|
||||
let os_specific_jar = format!("boot-{}.jar", env::consts::OS);
|
||||
assert!(classpath.contains(&os_specific_jar), "{} is not present in classpath: {}", os_specific_jar, classpath);
|
||||
let separators = classpath.chars().filter(|c| *c == '/' || *c == '\\').collect::<HashSet<char>>();
|
||||
assert_eq!(separators, HashSet::from([MAIN_SEPARATOR]), "Unexpected directory separators in {}", classpath);
|
||||
}
|
||||
|
||||
fn assert_startup_error(result: &LauncherRunResult, message: &str) {
|
||||
|
||||
Reference in New Issue
Block a user