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

copy flag implemented #437

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

copy flag implemented #437

wants to merge 6 commits into from

Conversation

EugeneDar
Copy link

@EugeneDar
Copy link
Author

It's still a draft.

@EugeneDar
Copy link
Author

At this point, running the c2eo -copy sourse.c target.eo command will copy the desired directory locally. I created a puzzle so that the directory is downloaded from the online repository (I may have to add just one more line).

@EugeneDar
Copy link
Author

@yegor256 @Graur please have a look

@yegor256
Copy link
Member

yegor256 commented Jan 9, 2023

@EugeneDar no unit tests to cover this new functionality?

@EugeneDar
Copy link
Author

@yegor256 I have no idea how to write tests, for the console command. Can you give an example of how to do this?

@yegor256
Copy link
Member

@EugeneDar just like any other unit tests. The main() function is just a function. You can call it from your unit test providing it the list of strings as arguments. Then, you see what it returns and prints to console. See: https://stackoverflow.com/questions/4191089/how-to-unit-test-function-writing-to-stdout-stdcout

@EugeneDar
Copy link
Author

@yegor256 previously added the --meta flag, so I would like to make tests in its likeness, since I am not familiar with the project. However, there are no such tests, and there are several directories with tests, so it is still not clear where to add unit tests for main. I also did not find main called in any of the tests.

@yegor256
Copy link
Member

@EugeneDar to my knowledge, the repository has a few unit tests. Doesn't README explain where they are? If it doesn't, make a ticket about it.

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.

2 participants