1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

scanner: remove the restriction for \x00 in strings (#13493)

This commit is contained in:
Delyan Angelov
2022-02-16 23:41:05 +02:00
committed by GitHub
parent 54b10e99a1
commit 89b99ad4c3
4 changed files with 4 additions and 23 deletions

View File

@@ -980,3 +980,7 @@ fn test_string_f32() {
assert '-123'.f32() - (-123) < f32_epsilon
assert '-123.456'.f32() - (-123.456) <= f32_epsilon
}
fn test_string_with_zero_byte_escape() {
assert '\x00'.bytes() == [byte(0)]
}