File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
crates/toml_edit/tests/testsuite Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,36 @@ key3 = 8.1415926
200
200
"# ] ] ) ;
201
201
}
202
202
203
+ #[ test]
204
+ fn test_insert_key_with_quotes ( ) {
205
+ given (
206
+ r#"
207
+ [package]
208
+ name = "foo"
209
+
210
+ [target]
211
+ "# ,
212
+ )
213
+ . running ( |root| {
214
+ root[ "target" ] [ "cfg(target_os = \" linux\" )" ] = table ( ) ;
215
+ root[ "target" ] [ "cfg(target_os = \" linux\" )" ] [ "dependencies" ] = table ( ) ;
216
+ root[ "target" ] [ "cfg(target_os = \" linux\" )" ] [ "dependencies" ] [ "name" ] = value ( "dep" ) ;
217
+ } )
218
+ . produces_display ( str![ [ r#"
219
+
220
+ [package]
221
+ name = "foo"
222
+
223
+ [target]
224
+
225
+ [target."cfg(target_os = \"linux\")"]
226
+
227
+ [target."cfg(target_os = \"linux\")".dependencies]
228
+ name = "dep"
229
+
230
+ "# ] ] ) ;
231
+ }
232
+
203
233
// removal
204
234
205
235
#[ test]
You can’t perform that action at this time.
0 commit comments