Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions mock-server/app/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,24 @@
$response->json(['enabled' => false, 'verified' => null, 'scopes' => ['read', 'write'], 'settings' => new \stdClass()]);
});

App::get('/v1/mock/tests/general/preset/settings')
->desc('Get Preset Settings')
->groups(['mock'])
->label('scope', 'public')
->inject('response')
->action(function (UtopiaSwooleResponse $response) {
$response->setContentType('application/json')->send('{}');
});

App::get('/v1/mock/tests/general/preset/profile')
->desc('Get Preset Profile')
->groups(['mock'])
->label('scope', 'public')
->inject('response')
->action(function (UtopiaSwooleResponse $response) {
$response->setContentType('application/json')->send('{}');
});

App::get('/v1/mock/tests/general/presets')
->desc('List Presets')
->groups(['mock'])
Expand Down
6 changes: 3 additions & 3 deletions src/SDK/Language/Dart.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,13 @@ public function getFilters(): array
$resolveKey = function ($value) use ($enumValues, $enumKeys): string {
$index = array_search($value, $enumValues, true);
if ($index !== false && isset($enumKeys[$index]) && $enumKeys[$index] !== '') {
return $this->toCamelCase($enumKeys[$index]);
return $this->escapeKeyword($this->toCamelCase($enumKeys[$index]));
}
if ($index !== false && isset($enumValues[$index])) {
return $this->toCamelCase($enumValues[$index]);
return $this->escapeKeyword($this->toCamelCase($enumValues[$index]));
}
$fallback = $enumKeys[0] ?? $enumValues[0] ?? $value;
return $this->toCamelCase((string)$fallback);
return $this->escapeKeyword($this->toCamelCase((string)$fallback));
};

if ($isArray) {
Expand Down
11 changes: 11 additions & 0 deletions src/SDK/Language/Python.php
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,17 @@ protected function toPythonValue(mixed $value, int $indent = 8): string
return \is_string($json) ? $json : 'None';
}

/**
* A map field's `{}` default decodes to an empty PHP array, which would render as a list.
*/
#[Override]
public function getModelDefault(Schema $property, bool $required): mixed
{
$default = parent::getModelDefault($property, $required);

return $default === [] && !($property instanceof ArraySchema) ? new stdClass() : $default;
}

protected function toPythonLiteral(mixed $value): string
{
if (\is_object($value)) {
Expand Down
8 changes: 5 additions & 3 deletions src/SDK/Language/Ruby.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public function getParamExample(Schema|Parameter $param, string $lang = ''): str
case self::TYPE_NUMBER:
case self::TYPE_INTEGER:
case self::TYPE_BOOLEAN:
$output .= 'null';
$output .= 'nil';
break;
case self::TYPE_STRING:
$output .= "''";
Expand Down Expand Up @@ -295,7 +295,7 @@ public function getParamExample(Schema|Parameter $param, string $lang = ''): str
$output .= ($example) ? 'true' : 'false';
break;
case self::TYPE_STRING:
$output .= "'{$example}'";
$output .= "'" . \addcslashes((string) $example, "'\\") . "'";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a syntax check for generated Ruby examples

This changes how Ruby example strings are escaped, but the generation suite has no Ruby equivalent of testPhpExamplesParse() to parse the emitted docs. A later quoting regression could reintroduce invalid examples without failing CI; adding a Ruby parse check for generated examples would keep this fix covered.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/SDK/Language/Ruby.php
Line: 298

Comment:
**Add a syntax check for generated Ruby examples**

This changes how Ruby example strings are escaped, but the generation suite has no Ruby equivalent of `testPhpExamplesParse()` to parse the emitted docs. A later quoting regression could reintroduce invalid examples without failing CI; adding a Ruby parse check for generated examples would keep this fix covered.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

🟡 Minor · testing · Reply if this doesn't apply.

break;
case self::TYPE_FILE:
$output .= "InputFile.from_path('dir/file.png')";
Expand Down Expand Up @@ -327,7 +327,9 @@ protected function jsonToHash(array $data, int $indent = 0): string
} elseif (is_bool($node)) {
$value = $node ? 'true' : 'false';
} elseif (is_string($node)) {
$value = '"' . $node . '"';
$value = "'" . \addcslashes($node, "'\\") . "'";
} elseif (is_null($node)) {
$value = 'nil';
} else {
$value = $node;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ private fun levelsOf(levels: List<String>): List<String> {
}
require(!level.contains("+")) { "\"$level\" contains \"+\", not allowed in a topic" }
require(!level.contains("#")) { "\"$level\" contains \"#\", not allowed in a topic" }
require(!level.contains('\u0000')) { "level at index $index contains a NUL character" }
}
return levels.toList()
}
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Client client = Client()

{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = {{service.name | caseUcfirst}}(client);

{% if method.method.value != 'delete' and (method | methodType) != 'webAuth' %}{% if (method | methodType) == 'location' %}Uint8List{% elseif (method | getValidResponseModels)|length > 1 %}dynamic{% else %}models.{{ (method | responseModel) | caseUcfirst | overrideIdentifier }}{% endif %} result = {% endif %}await {{ service.name | caseCamel }}.{{ (method | methodName) | caseCamel }}({% if (method | parameters('all')) | length == 0 %});{% endif %}
{% if method.method.value != 'delete' and (method | methodType) != 'webAuth' %}{% if (method | methodType) == 'location' %}Uint8List{% elseif (method | textResponse) %}String{% elseif (method | getValidResponseModels)|length > 1 %}dynamic{% else %}models.{{ (method | responseModel) | caseUcfirst | overrideIdentifier }}{% endif %} result = {% endif %}await {{ service.name | caseCamel }}.{{ (method | methodName) | caseCamel }}({% if (method | parameters('all')) | length == 0 %});{% endif %}

{%~ for parameter in (method | parameters('all')) %}
{{ parameter.name | caseCamel | overrideIdentifier }}: {% if (parameter | enumValues) | length > 0 %}{{ parameter | enumExample }}{% else %}{{ parameter | paramExample | replace({'<field-name>': (parameter.name | caseCamel) }) | raw }}{% endif %},{% if not parameter.required %} // (optional){% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/src/models/model.dart.twig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class {{ definitionName | caseUcfirst | overrideIdentifier }} implements Model {
{% if not (property | schemaRequired) %} )
: null{% else %} ){% endif %}{% else %}{% if not (property | schemaRequired) %}map['{{ propertyName | escapeDollarSign }}'] != null
? {% endif %}{{ modelName }}.fromMap(
{% if not (property | schemaRequired) %} {% else %} {% endif %}map['{{ propertyName | escapeDollarSign }}'],
{% if not (property | schemaRequired) %} {% else %} {% endif %}map['{{ propertyName | escapeDollarSign }}']{% if property | schemaRequired %} ?? <String, dynamic>{}{% endif %},
{% if not (property | schemaRequired) %} )
: null{% else %} ){% endif %}{% endif %}{% elseif property | usesEnumType %}{% set enumName = (property | enumName) %}{% if property | arraySchema %}{% if not (property | schemaRequired) %}map['{{ propertyName | escapeDollarSign }}'] != null
? {% endif %}List<enums.{{ enumName | caseUcfirst }}>.from(
Expand Down
3 changes: 3 additions & 0 deletions templates/dart/lib/topic.dart.twig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ List<String> _topicLevelsOf(List<String> levels) {
if (level.contains('#')) {
throw ArgumentError('"$level" contains "#", not allowed in a topic');
}
if (level.contains('\u0000')) {
throw ArgumentError('level at index $index contains a NUL character');
}
}
return List.unmodifiable(levels);
}
4 changes: 4 additions & 0 deletions templates/dotnet/Package/Topic.cs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ namespace {{ spec.info.title | caseUcfirst }}
{
throw new ArgumentException($"\"{level}\" contains \"#\", not allowed in a topic");
}
if (level.Contains('\0'))
{
throw new ArgumentException($"level at index {index} contains a NUL character");
}
}

return list;
Expand Down
2 changes: 1 addition & 1 deletion templates/flutter/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ FutureBuilder<Uint8List>(
},
);
{% else %}
{% if method.method.value != 'delete' and (method | methodType) != 'webAuth' %}{% if (method | methodType) == 'location' %}Uint8List{% elseif (method | getValidResponseModels)|length > 1 %}dynamic{% else %}models.{{ (method | responseModel) | caseUcfirst | overrideIdentifier }}{% endif %} result = {% endif %}await {{ service.name | caseCamel }}.{{ (method | methodName) | caseCamel }}({% if (method | parameters('all')) | length == 0 %});{% endif %}
{% if method.method.value != 'delete' and (method | methodType) != 'webAuth' %}{% if (method | methodType) == 'location' %}Uint8List{% elseif (method | textResponse) %}String{% elseif (method | getValidResponseModels)|length > 1 %}dynamic{% else %}models.{{ (method | responseModel) | caseUcfirst | overrideIdentifier }}{% endif %} result = {% endif %}await {{ service.name | caseCamel }}.{{ (method | methodName) | caseCamel }}({% if (method | parameters('all')) | length == 0 %});{% endif %}

{%~ for parameter in (method | parameters('all')) %}
{{ parameter.name | caseCamel | overrideIdentifier}}: {% if (parameter | enumValues) | length > 0%}{{ parameter | enumExample }}{% else %}{{ parameter | paramExample | replace({'<field-name>': (parameter.name | caseCamel) }) | raw }}{% endif %},{% if not parameter.required %} // optional{% endif %}
Expand Down
3 changes: 3 additions & 0 deletions templates/go/topic.go.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func levelsOf(levels []string) []string {
if strings.Contains(level, "#") {
panic(fmt.Sprintf("\"%s\" contains \"#\", not allowed in a topic", level))
}
if strings.Contains(level, "\x00") {
panic(fmt.Sprintf("level at index %d contains a NUL character", index))
}
}
return append([]string(nil), levels...)
}
1 change: 1 addition & 0 deletions templates/kotlin/src/main/kotlin/io/appwrite/Topic.kt.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ private fun levelsOf(levels: List<String>): List<String> {
}
require(!level.contains("+")) { "\"$level\" contains \"+\", not allowed in a topic" }
require(!level.contains("#")) { "\"$level\" contains \"#\", not allowed in a topic" }
require(!level.contains('\u0000')) { "level at index $index contains a NUL character" }
}
return levels.toList()
}
Expand Down
3 changes: 3 additions & 0 deletions templates/php/src/Topic.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ final readonly class Topic implements \Stringable
if (\str_contains($level, '#')) {
throw new \InvalidArgumentException(\sprintf('"%s" contains "#", not allowed in a topic', $level));
}
if (\str_contains($level, "\0")) {
throw new \InvalidArgumentException(\sprintf('level at index %d contains a NUL character', $index));
}

$result[] = $level;
}
Expand Down
2 changes: 2 additions & 0 deletions templates/python/package/topic.py.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def _levels_of(levels):
raise ValueError(f'"{level}" contains "+", not allowed in a topic')
if "#" in level:
raise ValueError(f'"{level}" contains "#", not allowed in a topic')
if "\0" in level:
raise ValueError(f"level at index {index} contains a NUL character")
return tuple(levels)


Expand Down
1 change: 1 addition & 0 deletions templates/ruby/lib/container/topic.rb.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module {{spec.info.title | caseUcfirst }}
end
raise ArgumentError, "\"#{level}\" contains \"+\", not allowed in a topic" if level.include?('+')
raise ArgumentError, "\"#{level}\" contains \"#\", not allowed in a topic" if level.include?('#')
raise ArgumentError, "level at index #{index} contains a NUL character" if level.include?("\0")
end

levels.dup
Expand Down
6 changes: 6 additions & 0 deletions templates/rust/src/topic.rs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ fn levels_of<S: AsRef<str>>(levels: &[S]) -> Result<Vec<String>, TopicError> {
level
)));
}
if level.contains('\0') {
return Err(TopicError::new(format!(
"level at index {} contains a NUL character",
index
)));
}
Ok(level.to_string())
})
.collect()
Expand Down
1 change: 1 addition & 0 deletions templates/rust/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ fn test_topic_helpers() {
("slash", vec!["user/123"]),
("plus", vec!["user", "a+b"]),
("hash", vec!["user", "#"]),
("nul", vec!["user", "a\0b"]),
];
for (name, levels) in cases {
match topic::path(&levels) {
Expand Down
3 changes: 3 additions & 0 deletions templates/swift/Sources/Topic.swift.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ private func levelsOf(_ levels: [String]) throws -> [String] {
if level.contains("#") {
throw TopicError("\"\(level)\" contains \"#\", not allowed in a topic")
}
if level.contains("\0") {
throw TopicError("level at index \(index) contains a NUL character")
}
}
return levels
}
Expand Down
3 changes: 3 additions & 0 deletions templates/web/src/topic.ts.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ function levelsOf(levels: unknown): string[] {
if (level.includes('#')) {
throw new Error(`"${level}" contains "#", not allowed in a topic`);
}
if (level.includes('\0')) {
throw new Error(`level at index ${index} contains a NUL character`);
}
return level;
});
}
Expand Down
9 changes: 9 additions & 0 deletions tests/e2e/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ abstract class Base extends TestCase
'preset tier: PresetTier.FREE',
];

protected const MAP_MODEL_DEFAULT_RESPONSES = [
'preset settings: options=0',
];

protected const NESTED_MODEL_DEFAULT_RESPONSES = [
'preset profile: prefs=0',
];

protected const OBJECT_ARRAY_RESPONSES = [
'POST:/v1/mock/tests/general/documents:passed',
];
Expand Down Expand Up @@ -513,6 +521,7 @@ abstract class Base extends TestCase
'Topic slash:passed',
'Topic plus:passed',
'Topic hash:passed',
'Topic nul:passed',
];

protected const ADDITIONAL_PROPERTIES_RESPONSES = [
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/DartBetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ final class DartBetaTest extends Base
...Base::MODEL_DEFAULT_RESPONSES,
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::NESTED_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/DartStableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ final class DartStableTest extends Base
...Base::MODEL_DEFAULT_RESPONSES,
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::NESTED_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/FlutterBetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ final class FlutterBetaTest extends Base
...Base::MODEL_DEFAULT_RESPONSES,
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::NESTED_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::REALTIME_RESPONSES,
...Base::COOKIE_RESPONSES,
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/FlutterStableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ final class FlutterStableTest extends Base
...Base::MODEL_DEFAULT_RESPONSES,
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::NESTED_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::REALTIME_RESPONSES,
...Base::COOKIE_RESPONSES,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/Python310Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ final class Python310Test extends Base
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::PYTHON_MODEL_DEFAULT_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/Python311Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ final class Python311Test extends Base
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::PYTHON_MODEL_DEFAULT_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/Python312Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ final class Python312Test extends Base
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::PYTHON_MODEL_DEFAULT_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/Python313Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ final class Python313Test extends Base
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::PYTHON_MODEL_DEFAULT_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/Python39Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ final class Python39Test extends Base
...Base::NULLABLE_MODEL_RESPONSES,
...Base::ENUM_ARRAY_MODEL_RESPONSES,
...Base::PYTHON_MODEL_DEFAULT_RESPONSES,
...Base::MAP_MODEL_DEFAULT_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::OAUTH_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/languages/android/Tests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ class ServiceTest {
"slash" to listOf("user/123"),
"plus" to listOf("user", "a+b"),
"hash" to listOf("user", "#"),
"nul" to listOf("user", "a\u0000b"),
)
for ((name, levels) in topicErrorCases) {
try {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/languages/apple/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ class Tests: XCTestCase {
("slash", ["user/123"]),
("plus", ["user", "a+b"]),
("hash", ["user", "#"]),
("nul", ["user", "a\u{0}b"]),
]
for (name, levels) in topicCases {
do {
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/languages/dart/tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ void main() async {
print('empty presets: ${(await general.listEmptyPresets()).presets.length}');
print('preset verified: ${preset.verified}');
print('preset scopes: ${(preset.scopes ?? []).map((scope) => scope.value).join(',')}');
print('preset settings: options=${(await general.getPresetSettings()).options.length}');
print('preset profile: prefs=${(await general.getPresetProfile()).prefs.data.length}');

try {
await general.error400();
Expand Down Expand Up @@ -347,6 +349,7 @@ void main() async {
'slash': ['user/123'],
'plus': ['user', 'a+b'],
'hash': ['user', '#'],
'nul': ['user', 'a\u0000b'],
};
topicCases.forEach((name, levels) {
try {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/languages/dotnet/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ public async Task Test1()
("slash", new[] { "user/123" }),
("plus", new[] { "user", "a+b" }),
("hash", new[] { "user", "#" }),
("nul", new[] { "user", "a\0b" }),
};
foreach (var (name, levels) in topicCases)
{
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/languages/flutter/tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ void main() async {
print('empty presets: ${(await general.listEmptyPresets()).presets.length}');
print('preset verified: ${preset.verified}');
print('preset scopes: ${(preset.scopes ?? []).map((scope) => scope.value).join(',')}');
print('preset settings: options=${(await general.getPresetSettings()).options.length}');
print('preset profile: prefs=${(await general.getPresetProfile()).prefs.data.length}');

try {
await general.error400();
Expand Down Expand Up @@ -494,6 +496,7 @@ void main() async {
'slash': ['user/123'],
'plus': ['user', 'a+b'],
'hash': ['user', '#'],
'nul': ['user', 'a\u0000b'],
};
topicCases.forEach((name, levels) {
try {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/languages/go-v2/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ func testTopicHelpers() {
{"slash", []string{"user/123"}},
{"plus", []string{"user", "a+b"}},
{"hash", []string{"user", "#"}},
{"nul", []string{"user", "a\x00b"}},
}
for _, c := range cases {
if topicPanics(c.levels) {
Expand Down
Loading
Loading