Signature & tests for fn load_from_file()
This function almost writes itself. I need a thin layer to handle the file IO errors and report them appropriately, and then all the magic is a pass-through of the existing read_conf_str. I've made basic unit tests for the most obvious scenarios. The test for missing-file behavior is incomplete because I need to create a new error variant.
This commit is contained in:
5
test_data/missing_all_table.toml
Normal file
5
test_data/missing_all_table.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
# There must be an "[all]" table or the loader will reject the config file.
|
||||
|
||||
["/some/other/path"]
|
||||
gitea_url = "fake-url"
|
||||
|
||||
Reference in New Issue
Block a user