OneLauncher-Cracked/packages/oneclient_core/tests/patch.rs
oiupoyt 163eb0ac0c
Some checks are pending
Release Multiplatform Binaries / build (deb,appimage, linux-x86_64, ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-arm64, macos-14, aarch64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-x86_64, macos-14, x86_64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (nsis, windows-x86_64, windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Release Multiplatform Binaries / create-release (push) Blocked by required conditions
feat: update base to official upstream 2.3.1 with all cracked features intact (2.3.1-c1)
- Rebased onto official Polyfrost OneLauncher v2.3.1 (commit 0e49c691)
- Preserved 100% offline authentication without requiring Microsoft accounts
- Integrated custom 3D offline skin changer with UUID character slot targeting
- Maintained CustomSkinLoader auto-configuration for Ely.by and SkinRestorer
- Maintained direct GitHub Releases auto-updater pointing to oiupoyt/OneLauncher-Cracked
- Maintained mods filter popover fix eliminating text ghosting/duplication
- Configured dev profile to prevent debug symbol bloat
2026-09-07 17:38:22 +05:30

33 lines
805 B
Rust

use oneclient_common::patch::Patch;
#[test]
fn patch_apply_to_option() {
let mut slot = Some(42u32);
Patch::Unchanged.apply_to_option(&mut slot);
assert_eq!(slot, Some(42));
Patch::Set(99).apply_to_option(&mut slot);
assert_eq!(slot, Some(99));
Patch::<u32>::Clear.apply_to_option(&mut slot);
assert_eq!(slot, None);
}
#[test]
fn patch_command_empty_string_clears() {
let mut slot: Option<String> = Some("wrapper".into());
Patch::Set(" ".to_owned()).apply_to_command_option(&mut slot);
assert_eq!(slot, Some("".to_owned()));
}
#[test]
fn patch_into_db_patch() {
assert_eq!(Patch::<String>::Unchanged.into_db_patch(), None);
assert_eq!(Patch::<String>::Clear.into_db_patch(), Some(None));
assert_eq!(
Patch::Set("x".to_string()).into_db_patch(),
Some(Some("x".to_string()))
);
}