strings: test Builder's cut_last on windows
parent
709d7460de
commit
7446d8dc44
|
@ -30,15 +30,14 @@ fn test_sb() {
|
||||||
sb = strings.new_builder(10)
|
sb = strings.new_builder(10)
|
||||||
sb.write_string('x = $x y = $y')
|
sb.write_string('x = $x y = $y')
|
||||||
assert sb.str() == 'x = 10 y = 20'
|
assert sb.str() == 'x = 10 y = 20'
|
||||||
$if !windows {
|
//$if !windows {
|
||||||
// TODO msvc bug
|
sb = strings.new_builder(10)
|
||||||
sb = strings.new_builder(10)
|
sb.write_string('123456')
|
||||||
sb.write_string('123456')
|
last_2 := sb.cut_last(2)
|
||||||
last_2 := sb.cut_last(2)
|
assert last_2 == '56'
|
||||||
assert last_2 == '56'
|
final_sb := sb.str()
|
||||||
final_sb := sb.str()
|
assert final_sb == '1234'
|
||||||
assert final_sb == '1234'
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
Loading…
Reference in New Issue