MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / confirmation_code_format

Function confirmation_code_format

crates/openshell-cli/src/auth.rs:446–459  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

444
445 #[test]
446 fn confirmation_code_format() {
447 let code = generate_confirmation_code();
448 // Format: XXX-XXXX (3 chars, dash, 4 chars) = 8 chars total
449 assert_eq!(code.len(), 8, "code should be 8 chars: {code}");
450 assert_eq!(
451 code.chars().nth(3),
452 Some('-'),
453 "code should have dash at position 3: {code}"
454 );
455 assert!(
456 code.chars().all(|c| c.is_ascii_alphanumeric() || c == '-'),
457 "code should be alphanumeric + dash: {code}"
458 );
459 }
460
461 #[test]
462 fn confirmation_codes_are_unique() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected