Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Dec 19, 2024
1 parent 150dd73 commit 9c9ff26
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
8 changes: 5 additions & 3 deletions libs/config/tests/lints/c11_file_type.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
class CfgVehicles {
class MyVehicle {
model = "test.p3d";
editorPreview = "test.jgp";
wounds[] = {"would1.pac", "wound2.paa", "wound3.png"};
model = "x\mod\test.p3d";
uimodel = "x\mod\test_no_path";
editorPreview = "x\mod\test.jgp";
wounds[] = {"x\mod\would1.pac", "x\mod\wound2.paa", "x\mod\wound3.png"};
modelspecial = "class_name";
};
};
19 changes: 13 additions & 6 deletions libs/config/tests/snapshots/lints__config_error_c11_file_type.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@
source: libs/config/tests/lints.rs
expression: lint(stringify! (c11_file_type))
---
warning[L-C11ME]: a property that references a file is missing a file extension
┌─ c11_file_type.hpp:4:20
│
4 │ uimodel = "x\mod\test_no_path";
│ ^^^^^^^^^^^^^^^^^^ missing file extension


warning[L-C11UE]: a property that references a file has an unusual file type
[0m[36m┌─[0m c11_file_type.hpp:4:31
[0m[36m┌─[0m c11_file_type.hpp:5:37
│
[0m[36m4[0m [0m[36m│[0m editorPreview = "test.[0m[33mjgp[0m";
[0m[36m│[0m [0m[33m^^^[0m [0m[33munusual file type[0m
[0m[36m5[0m [0m[36m│[0m editorPreview = "x\mod\test.[0m[33mjgp[0m";
[0m[36m│[0m [0m[33m^^^[0m [0m[33munusual file type[0m
│
= note: expected file type jpg


warning[L-C11UE]: a property that references a file has an unusual file type
[0m[36m┌─[0m c11_file_type.hpp:5:57
[0m[36m┌─[0m c11_file_type.hpp:6:75
│
[0m[36m5[0m [0m[36m│[0m wounds[] = {"would1.pac", "wound2.paa", "wound3.[0m[33mpng[0m"};
[0m[36m│[0m [0m[33m^^^[0m [0m[33munusual file type[0m
[0m[36m6[0m [0m[36m│[0m wounds[] = {"x\mod\would1.pac", "x\mod\wound2.paa", "x\mod\wound3.[0m[33mpng[0m"};
[0m[36m│[0m [0m[33m^^^[0m [0m[33munusual file type[0m
│
= note: expected file type paa

0 comments on commit 9c9ff26

Please sign in to comment.