mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:46:01 +02:00
switch substring to bytes (#538)
* switch substring to bytes * Add a test
This commit is contained in:
@ -1316,3 +1316,11 @@ fn flatten_should_flatten_inner_table() -> TestResult {
|
||||
"123",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cjk_in_substrings() -> TestResult {
|
||||
run_test(
|
||||
r#"let s = '[Rust 程序设计语言](title-page.md)'; let start = ($s | str index-of '('); let end = ($s | str index-of ')'); echo ($s | str substring $"($start + 1),($end)")"#,
|
||||
"title-page.md",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user