Add multiline string length tests.
This commit is contained in:
parent
67ac2437e9
commit
c9ad518d52
5
source/compiler/tests/multiline_string_sizes.meta
Normal file
5
source/compiler/tests/multiline_string_sizes.meta
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
'test_type': 'output_check',
|
||||
'errors': """
|
||||
"""
|
||||
}
|
23
source/compiler/tests/multiline_string_sizes.pwn
Normal file
23
source/compiler/tests/multiline_string_sizes.pwn
Normal file
@ -0,0 +1,23 @@
|
||||
// This file should pass with \r\n and \n.
|
||||
|
||||
new str1[] = "hello";
|
||||
#assert sizeof(str1) == 6
|
||||
|
||||
new str2[] = "hello\
|
||||
";
|
||||
#assert sizeof(str2) == 6
|
||||
|
||||
new str3[] = "hello\
|
||||
";
|
||||
#assert sizeof(str3) == 6
|
||||
|
||||
new str4[] = "hello\
|
||||
world";
|
||||
#assert sizeof(str4) == 11
|
||||
|
||||
new str5[] = "hello
|
||||
world";
|
||||
#assert sizeof(str5) == 23
|
||||
|
||||
#pragma unused str1, str2, str3, str4, str5
|
||||
|
Loading…
x
Reference in New Issue
Block a user