Skip to content

Commit

Permalink
Update golden test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
FPtje committed Jul 26, 2023
1 parent 4f69609 commit b9f15a7
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 31 deletions.
20 changes: 18 additions & 2 deletions tests/golden/data/output/darkrp-jobrelated.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,24 @@ TEAM_CITIZEN = DarkRP.createJob(
"Citizen",
{
color = Color(20, 150, 20, 255),
model = {"models/player/Group01/Female_01.mdl", "models/player/Group01/Female_02.mdl", "models/player/Group01/Female_03.mdl", "models/player/Group01/Female_04.mdl", "models/player/Group01/Female_06.mdl", "models/player/group01/male_01.mdl", "models/player/Group01/Male_02.mdl", "models/player/Group01/male_03.mdl", "models/player/Group01/Male_04.mdl", "models/player/Group01/Male_05.mdl", "models/player/Group01/Male_06.mdl", "models/player/Group01/Male_07.mdl", "models/player/Group01/Male_08.mdl", "models/player/Group01/Male_09.mdl"},
-- test comment -- another comment -- look at this comment
model = {
"models/player/Group01/Female_01.mdl",
"models/player/Group01/Female_02.mdl",
"models/player/Group01/Female_03.mdl", -- test comment
"models/player/Group01/Female_04.mdl",
"models/player/Group01/Female_06.mdl",
"models/player/group01/male_01.mdl",
"models/player/Group01/Male_02.mdl",
"models/player/Group01/male_03.mdl",
"models/player/Group01/Male_04.mdl",
"models/player/Group01/Male_05.mdl",
"models/player/Group01/Male_06.mdl",
"models/player/Group01/Male_07.mdl",
"models/player/Group01/Male_08.mdl",
"models/player/Group01/Male_09.mdl"
},
-- another comment
-- look at this comment
description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
weapons = {},
command = "citizen",
Expand Down
6 changes: 5 additions & 1 deletion tests/golden/data/output/issue-106.lua
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
a({b}, function() end, function() end) -- comment
a(
{b},
function() end, -- comment
function() end
)
6 changes: 5 additions & 1 deletion tests/golden/data/output/issue-129.lua
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
local table = {function() return nil end} -- comment
local table = {
function()
return nil -- comment
end
}
66 changes: 42 additions & 24 deletions tests/golden/data/output/issue-148.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
local normalSounds = {Sound("honk1.wav"), Sound("honk2.wav"), Sound("honk3.wav"), Sound("honk4.wav")}
render.DrawBeam(self.StartPos - norm, self.EndPos, 64 * (1 - self.Life), texcoord, texcoord + self.Length / 128, Color(Lerp(self.Life, 255, 50), Lerp(self.Life, 100, 50), 255, 255)) -- Start -- End -- Width -- Start tex coord -- End tex coord -- Color (optional)
render.DrawBeam(
self.StartPos - norm, -- Start
self.EndPos, -- End
64 * (1 - self.Life), -- Width
texcoord, -- Start tex coord
texcoord + self.Length / 128, -- End tex coord
Color(
-- Color (optional)
Lerp(self.Life, 255, 50),
Lerp(self.Life, 100, 50),
255,
255
)
)

function a()
return 1, 2, 3, 4, 5
end
Expand All @@ -22,12 +36,13 @@ local normalSounds = {

-- format: multiline
render.DrawBeam(
self.StartPos - norm,
self.EndPos,
64 * (1 - self.Life),
texcoord,
texcoord + self.Length / 128,
self.StartPos - norm, -- Start
self.EndPos, -- End
64 * (1 - self.Life), -- Width
texcoord, -- Start tex coord
texcoord + self.Length / 128, -- End tex coord
Color(
-- Color (optional)
Lerp(
self.Life,
255,
Expand All @@ -43,12 +58,6 @@ render.DrawBeam(
)
)

-- Start
-- End
-- Width
-- Start tex coord
-- End tex coord
-- Color (optional)
-- format: multiline
function a()
return 1, 2, 3, 4, 5
Expand Down Expand Up @@ -79,12 +88,13 @@ local normalSounds = {
format: multiline
]]
render.DrawBeam(
self.StartPos - norm,
self.EndPos,
64 * (1 - self.Life),
texcoord,
texcoord + self.Length / 128,
self.StartPos - norm, -- Start
self.EndPos, -- End
64 * (1 - self.Life), -- Width
texcoord, -- Start tex coord
texcoord + self.Length / 128, -- End tex coord
Color(
-- Color (optional)
Lerp(
self.Life,
255,
Expand All @@ -100,14 +110,22 @@ render.DrawBeam(
)
)

-- Start
-- End
-- Width
-- Start tex coord
-- End tex coord
-- Color (optional)
local normalSounds = {Sound("honk1.wav"), Sound("honk2.wav"), Sound("honk3.wav"), Sound("honk4.wav")}
render.DrawBeam(self.StartPos - norm, self.EndPos, 64 * (1 - self.Life), texcoord, texcoord + self.Length / 128, Color(Lerp(self.Life, 255, 50), Lerp(self.Life, 100, 50), 255, 255)) -- Start -- End -- Width -- Start tex coord -- End tex coord -- Color (optional)
render.DrawBeam(
self.StartPos - norm, -- Start
self.EndPos, -- End
64 * (1 - self.Life), -- Width
texcoord, -- Start tex coord
texcoord + self.Length / 128, -- End tex coord
Color(
-- Color (optional)
Lerp(self.Life, 255, 50),
Lerp(self.Life, 100, 50),
255,
255
)
)

function a()
return 1, 2, 3, 4, 5
end
Expand Down
4 changes: 1 addition & 3 deletions tests/golden/data/output/issue-155.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
r = function(...)
(...)[...] = nil
end
r = function(...) (...)[...] = nil end

0 comments on commit b9f15a7

Please sign in to comment.