File tree 1 file changed +8
-16
lines changed
1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -119,28 +119,20 @@ version = "1.0.0"
119
119
result .rocks = {
120
120
neorg = { version = " 2.0.0" , pin = true },
121
121
}
122
- local expected = [[
123
- [rocks]
124
-
125
- [rocks.neorg]
126
- version = "2.0.0"
127
- pin = true
128
- ]]
129
- assert .equal (expected , tostring (result ))
122
+ local result_str = tostring (result )
123
+ assert .is_not_nil (result_str :find (" %[rocks.neorg]" ))
124
+ assert .is_not_nil (result_str :find (' version = "2.0.0"' ))
125
+ assert .is_not_nil (result_str :find (" pin = true" ))
130
126
end )
131
127
it (" Can add entire table" , function ()
132
128
local result = toml_edit .parse ([[ ]] )
133
129
result .rocks = {
134
130
neorg = { version = " 2.0.0" , pin = true },
135
131
}
136
- local expected = [[
137
- [rocks]
138
-
139
- [rocks.neorg]
140
- version = "2.0.0"
141
- pin = true
142
- ]]
143
- assert .equal (expected , tostring (result ))
132
+ local result_str = tostring (result )
133
+ assert .is_not_nil (result_str :find (" %[rocks.neorg]" ))
134
+ assert .is_not_nil (result_str :find (' version = "2.0.0"' ))
135
+ assert .is_not_nil (result_str :find (" pin = true" ))
144
136
end )
145
137
it (" Can set value in array" , function ()
146
138
local toml_content = [[
You can’t perform that action at this time.
0 commit comments