.ends_with(".cookie")); } #[test] fn uses_network_defaults() { let arguments = Arguments::try_parse_from(["ord", "--chain=signet", "index", "update"]).unwrap(); assert_eq!(arguments.options.rpc_url(), "127.0.0.1:38332/wallet/ord"); assert!(arguments .options .cookie_file() .unwrap() .display() .to_string() .ends_with(if cfg!(windows) { r"\signet\.cookie" } else { "/signet/.cookie" })); } #[test] fn mainnet_cookie_file_path() { let cookie_file = Arguments::try_parse_from(["ord", "index", "update"]) .unwrap() .options .cookie_file() .unwrap() .display() .to_string(); assert!(cookie_file.ends_with(if cfg!(target_os = "linux") { "/.bitcoin/.cookie" } else if cfg!(windows) { r"\Bitcoin\.cookie" } else { "/Bitcoin/.cookie" })) } #[test] fn othernet_cookie_file_path() { let arguments = Arguments::try_parse_from(["ord", "--chain=signet", "index", "update"]).unwrap();