strings: test Builder's cut_last on windows

pull/9118/head
Alexander Medvednikov 2021-03-04 20:35:17 +03:00
parent 709d7460de
commit 7446d8dc44
1 changed files with 8 additions and 9 deletions

View File

@ -30,15 +30,14 @@ fn test_sb() {
sb = strings.new_builder(10)
sb.write_string('x = $x y = $y')
assert sb.str() == 'x = 10 y = 20'
$if !windows {
// TODO msvc bug
sb = strings.new_builder(10)
sb.write_string('123456')
last_2 := sb.cut_last(2)
assert last_2 == '56'
final_sb := sb.str()
assert final_sb == '1234'
}
//$if !windows {
sb = strings.new_builder(10)
sb.write_string('123456')
last_2 := sb.cut_last(2)
assert last_2 == '56'
final_sb := sb.str()
assert final_sb == '1234'
//}
}
const (