Skip to content
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

Add file_exist function to std #114

Merged
merged 2 commits into from
May 27, 2024
Merged

Add file_exist function to std #114

merged 2 commits into from
May 27, 2024

Conversation

clysto
Copy link
Contributor

@clysto clysto commented May 26, 2024

No description provided.

Copy link
Member

@b1ek b1ek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clysto
Copy link
Contributor Author

clysto commented May 26, 2024

How to write a test about file operations? I saw that the test does not include a test for file_read/file_write. Can you give me an example?

@b1ek
Copy link
Member

b1ek commented May 26, 2024

How to write a test about file operations? I saw that the test does not include a test for file_read/file_write. Can you give me an example?

that is weird that there are no tests for those functions.

tests are written like this:

#[test]
fn name_of_the_test() {
    test_amber!("// put amber code here", "what the code should output");
}

i guess that if the other file functions are not covered for now, we could sweep that issue under the carpet in the scope of this PR. (see #117)

@Ph0enixKM
Copy link
Member

I think that we will focus on std more in the next milestone. Right now we have to focus on making Amber usable in terms of making generated bash more user friendly and more debuggable I think. Although if you're adding file_exist function, please add dir_exist function as well @clysto. Thanks! The tests regarding STD will be added as soon as we improve the DX

Copy link
Member

@Ph0enixKM Ph0enixKM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add dir_exist function as well to keep things symmetrical

@boushley boushley requested a review from Ph0enixKM May 27, 2024 18:14
@Ph0enixKM Ph0enixKM merged commit ded67b3 into amber-lang:master May 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants