-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(settings): distinguish unset known settings from unknown ones #9818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,9 @@ assert_contains "mise settings -T" "all_compile = true" | |
| mise settings unset all_compile | ||
| assert "mise settings get all_compile" "false" | ||
| assert_fail "mise settings get abcdefg" "mise ERROR Unknown setting: abcdefg" | ||
| assert_fail "mise settings get python.compyle" "mise ERROR Unknown setting: python.compyle" | ||
| assert_fail "mise settings get python.compile" "mise ERROR Setting [python.compile] is not set" | ||
| assert_fail "mise settings get cargo.registry_name" "mise ERROR Setting [cargo.registry_name] is not set" | ||
|
Comment on lines
15
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To fully verify that the logic correctly distinguishes between unset known settings and actual typos (unknown settings), it is recommended to add a test case where a key has a valid prefix but an invalid leaf name (e.g., |
||
| assert "mise settings all_compile" "false" | ||
| assert "mise settings all_compile=1" | ||
| assert "mise settings all_compile" "true" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the error message for unknown settings is updated to include brackets for consistency, this test case should be updated to match the new output.