mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:16:32 +02:00
Handle reverse ranges
This is really ugly and should be refactored.
This commit is contained in:
@ -590,10 +590,15 @@ fn non_string_in_string() -> TestResult {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn int_in_range() -> TestResult {
|
||||
fn int_in_inc_range() -> TestResult {
|
||||
run_test(r#"1 in -4..9.42"#, "true")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn int_in_dec_range() -> TestResult {
|
||||
run_test(r#"1 in 9.42..-4"#, "true")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn int_in_exclusive_range() -> TestResult {
|
||||
run_test(r#"3 in 0..<3"#, "false")
|
||||
|
Reference in New Issue
Block a user