mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 18:59:06 +02:00
Merged tests to produce a single binary (#12826)
This PR should close #7147 # Description Merged src/tests into /tests to produce a single binary.  # User-Facing Changes No user facing changes # Tests + Formatting Moved tests. Tollkit check pr pass. # After Submitting --------- Co-authored-by: Ian Manske <ian.manske@pm.me>
This commit is contained in:
committed by
GitHub
parent
c70c43aae9
commit
c4dca5fe03
36
tests/repl/test_ranges.rs
Normal file
36
tests/repl/test_ranges.rs
Normal file
@ -0,0 +1,36 @@
|
||||
use crate::repl::tests::{fail_test, run_test, TestResult};
|
||||
|
||||
#[test]
|
||||
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")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn non_number_in_range() -> TestResult {
|
||||
fail_test(r#"'a' in 1..3"#, "subset comparison is not supported")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn float_not_in_inc_range() -> TestResult {
|
||||
run_test(r#"1.4 not-in 2..9.42"#, "true")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn range_and_reduction() -> TestResult {
|
||||
run_test(r#"1..6..36 | math sum"#, "148")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn zip_ranges() -> TestResult {
|
||||
run_test(r#"1..3 | zip 4..6 | get 2.1"#, "6")
|
||||
}
|
Reference in New Issue
Block a user