getopt3 2.6.1

Zero dependency command line argument parser
Documentation
/*
 * Copyright (c) Radim Kolar 2024.
 * SPDX-License-Identifier: MIT
 *
 * getopt3 library is licensed under MIT license:
 *   https://spdx.org/licenses/MIT.html
*/

use super::validate_optchar;


//    validate_optchar tests


#[test]
fn validate_optchar_collon() {
   assert! ( validate_optchar(':').is_err() );
}

#[test]
fn validate_optchar_plus() {
   assert! ( validate_optchar('+').is_err() );
}

#[test]
fn validate_optchar_dash() {
   assert! ( validate_optchar('-').is_err() );
}

#[test]
fn validate_optchar_question_mark() {
   assert! ( validate_optchar('?').is_ok() );
}

#[test]
fn validate_optchar_number() {
   assert! ( validate_optchar('6').is_ok() );
}

#[test]
fn validate_optchar_lowercase() {
   assert! ( validate_optchar('a').is_ok() );
}

#[test]
fn validate_optchar_uppercase() {
   assert! ( validate_optchar('B').is_ok() );
}