-- Cargo.toml -- == should format "comit" Cargo.toml file == [package] authors = ["Some author"] name = "package" description = "Description" version = "0.1.0" edition = "2018" [dependencies] b = "0.1" a = { version = "0.8", features = ["serde", "v4"] } [dev-dependencies] c = "0.1" a = { version = "0.8", features = ["serde", "v4"] } b = "0.2" [features] default = [] test = ["feature"] [expect] [package] name = "package" version = "0.1.0" authors = ["Some author"] edition = "2018" description = "Description" [dependencies] a = { version = "0.8", features = ["serde", "v4"] } b = "0.1" [dev-dependencies] a = { version = "0.8", features = ["serde", "v4"] } b = "0.2" c = "0.1" [features] default = [] test = ["feature"] == should handle comments between key value pairs in dependencies == [dependencies] test4 = "5" # 1 # 2 # 3 test2 = "5" # 4 # 5 test3 = "5" # 6 # 7 test1 = "5" # 8 # 9 [expect] [dependencies] # 7 test1 = "5" # 8 # 2 # 3 test2 = "5" # 4 # 5 test3 = "5" # 6 test4 = "5" # 1 # 9 == should have name and version at the front and description at the end of package == [package] name = "package" version = "1.12.2" license = "MIT" authors = ["the package authors"] edition = "2018" description = "Provides the package executable" repository = "https://github.com" default-run = "package" [expect] [package] name = "package" version = "1.12.2" authors = ["the package authors"] default-run = "package" edition = "2018" license = "MIT" repository = "https://github.com" description = "Provides the package executable" == should allow having dependencies in groups based on a blank line == [dependencies] z = "2" b = "1" m = "3" u = "2" a = "1" [expect] [dependencies] b = "1" m = "3" z = "2" a = "1" u = "2" == should handle moving around comments in groups == [dependencies] # 1 b = "2" a = "1" # 2 d = "3" # 3 c = "4" [expect] [dependencies] # 1 a = "1" b = "2" # 2 # 3 c = "4" d = "3"