Skip to content
Snippets Groups Projects
Commit 9df1c6c1 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Avoid invalid escaping in JSON

MangoHud historically had paths like `"/usr/\$LIB/..."` in its JSON
manifest, but this is not actually valid JSON, because JSON does not
define a meaning for `\$`. The version of json-glib in Debian testing
(Debian 13 prereleases) implements more correct / more strict JSON
parsing, which correctly but perhaps unhelpfully diagnoses this as an
error, breaking our test's expectations when our CI runs its tests in a
recent development environment.

We were not intentionally exercising the handling of invalid JSON, so
test against valid JSON here.

I've also opened https://gitlab.gnome.org/GNOME/json-glib/-/merge_requests/87


to return json-glib in non-strict mode to its previous behaviour for
these strings.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 3dbde195
No related branches found
No related tags found
1 merge request!762tests: Avoid invalid escaping in JSON
Pipeline #104958 passed
...@@ -443,7 +443,7 @@ with open('debian10/custom_path/MangoHud.json', 'w') as writer: ...@@ -443,7 +443,7 @@ with open('debian10/custom_path/MangoHud.json', 'w') as writer:
"layer" : { "layer" : {
"name" : "VK_LAYER_MANGOHUD_overlay", "name" : "VK_LAYER_MANGOHUD_overlay",
"type" : "GLOBAL", "type" : "GLOBAL",
"library_path" : "/usr/\\$LIB/libMangoHud.so", "library_path" : "/usr/$LIB/libMangoHud.so",
"api_version" : "1.2.135", "api_version" : "1.2.135",
"implementation_version" : "1", "implementation_version" : "1",
"description" : "Vulkan Hud Overlay", "description" : "Vulkan Hud Overlay",
...@@ -467,7 +467,7 @@ with open('debian10/expectations/MangoHud.json', 'w') as writer: ...@@ -467,7 +467,7 @@ with open('debian10/expectations/MangoHud.json', 'w') as writer:
"layer" : { "layer" : {
"name" : "VK_LAYER_MANGOHUD_overlay", "name" : "VK_LAYER_MANGOHUD_overlay",
"type" : "GLOBAL", "type" : "GLOBAL",
"library_path" : "/usr/\\$LIB/libMangoHud.so", "library_path" : "/usr/$LIB/libMangoHud.so",
"api_version" : "1.2.135", "api_version" : "1.2.135",
"implementation_version" : "1", "implementation_version" : "1",
"description" : "Vulkan Hud Overlay", "description" : "Vulkan Hud Overlay",
...@@ -837,7 +837,7 @@ with open( ...@@ -837,7 +837,7 @@ with open(
"name": "VK_LAYER_MANGOHUD_overlay", "name": "VK_LAYER_MANGOHUD_overlay",
"type": "GLOBAL", "type": "GLOBAL",
"api_version": "1.2.135", "api_version": "1.2.135",
"library_path": "/usr/lib/extensions/vulkan/\\$LIB/mangohud/libMangoHud.so", "library_path": "/usr/lib/extensions/vulkan/$LIB/mangohud/libMangoHud.so",
"description": "Vulkan Hud Overlay", "description": "Vulkan Hud Overlay",
"implementation_version": "1", "implementation_version": "1",
"functions": { "functions": {
...@@ -883,7 +883,7 @@ with open( ...@@ -883,7 +883,7 @@ with open(
"name": "VK_LAYER_RUNTIME_implicit", "name": "VK_LAYER_RUNTIME_implicit",
"type": "GLOBAL", "type": "GLOBAL",
"api_version": "1.2.135", "api_version": "1.2.135",
"library_path": "/usr/\\$LIB/implicit/libLayer.so", "library_path": "/usr/$LIB/implicit/libLayer.so",
"description": "Runtime's implicit layer", "description": "Runtime's implicit layer",
"implementation_version": "1", "implementation_version": "1",
"functions": { "functions": {
...@@ -949,7 +949,7 @@ with open( ...@@ -949,7 +949,7 @@ with open(
"name": "VK_LAYER_GLEXT_implicit", "name": "VK_LAYER_GLEXT_implicit",
"type": "GLOBAL", "type": "GLOBAL",
"api_version": "1.2.135", "api_version": "1.2.135",
"library_path": "/usr/\\$LIB/GL/implicit/libLayer.so", "library_path": "/usr/$LIB/GL/implicit/libLayer.so",
"description": "GL extension's implicit layer", "description": "GL extension's implicit layer",
"implementation_version": "1", "implementation_version": "1",
"functions": { "functions": {
...@@ -1143,7 +1143,7 @@ with open('fedora/custom_path2/MangoHud.json', 'w') as writer: ...@@ -1143,7 +1143,7 @@ with open('fedora/custom_path2/MangoHud.json', 'w') as writer:
"layer" : { "layer" : {
"name" : "VK_LAYER_MANGOHUD_overlay", "name" : "VK_LAYER_MANGOHUD_overlay",
"type" : "GLOBAL", "type" : "GLOBAL",
"library_path" : "/usr/\\$LIB/libMangoHud.so", "library_path" : "/usr/$LIB/libMangoHud.so",
"api_version" : "1.2.135", "api_version" : "1.2.135",
"implementation_version" : "1", "implementation_version" : "1",
"description" : "Vulkan Hud Overlay" "description" : "Vulkan Hud Overlay"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment