-
Notifications
You must be signed in to change notification settings - Fork 1
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
Stubbed out all builtin functions/tests #121
Conversation
@@ -256,6 +244,199 @@ mod attr_values { | |||
} | |||
} | |||
|
|||
mod baseNameOf { | |||
use super::*; |
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.
Mind adding a couple of tests for this function? Feel free to do in a separate PR.
@urbas Can you please approve again, or enable approvals to stay after commits |
Also FYI For the next PR I'm planning to try using graphite https://graphite.dev/ I've used graphite before, but would be interesting to try it on a smaller project like this |
); | ||
assert_eq!( | ||
eval_ok("builtins.baseNameOf \"/foo/bar/baz/\""), | ||
Value::Str("".into()) |
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.
Nix seems to return "baz"
for this test:
% nix eval --expr 'builtins.baseNameOf "/foo/bar/baz/"'
"baz"
Value::Str("".into()) | |
Value::Str("baz".into()) |
Btw, the basename
CLI tool also returns baz
in this case.
I haven't used graphite before, will give it a go. Btw, apologies for the slow responses. Was traveling a lot these days. |
Added stubs for all builtins and their respective test modules, ordered in the order they appear in the Nix manual
https://nixos.org/manual/nix/stable/language/builtins.html