git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [OUTREACHY] Final Application For Git Internshhip

From
Christian Couder <christian.couder@gmail.com>
Date
Oct 28, 2023, 08:24 UTC
Message-ID
<CAP8UFD34gre7Xxw=kFop93tLsGXc3RxasstBWpa6RaJ6VyEpFQ@mail.gmail.com>
In-Reply-To
<CACS=G2yGj2FYp9XBCknKqEXh5ZWXiQFLWrWk+SAmWzDMrjJwQg@mail.gmail.com>
On Wed, Oct 25, 2023 at 2:14 PM Naomi Ibe <naomi.ibeh69@gmail.com> wrote:
Show 5 quoted lines
>>
>> It could help to say if your contribution has been merged to 'master',
>> 'next', 'seen' or not at all.
>
>  My microproject contribution has been scheduled to be merged to the master branch.
Great, please add this information to your application.
Show 6 quoted lines
>> I think that one of the important tasks to be done early is to
>> identify what code in t/helper is unit testing C code and what code is
>> really about helping other tests in the t/t*.sh scripts. It would be
>> nice if you could give an example of each kind of code.
>
> In my opinion, helper/test-ctype.c is a unit test file containing a set of unit tests for character classification functions,
Right.
> while helper/test-dir-iterator.c is a unit test file which works together with the t/t0066-dir-iterator.sh file to iterate through a directory and give details on its contents. It likely is used for testing and inspecting directory structures and file types within a specified path.

Actually "t/helper/test-dir-iterator.c" and "t/t0066-dir-iterator.sh" are used together to test the code in "dir-iterator.h" and "dir-iterator.c", so it's kind of special. Ideally this could be ported to the unit test framework as the goal is to test quite low level code (instead of a full git command for example), but I am not sure how easy it would be, and if it would even be worth it.

Show 5 quoted lines
>> An example of how you would migrate parts of a test, or how a migrated
>> test would look like, would be nice.
>
> I'd first create a new test file, then include "test-libtap/tap.h" and "test-tool.h" header files, then I would initialize TAP with this command plan_tests(x), where x defines the number of tests to be run inside that file.
> Below the plan_tests();, I'd migrate and edit my specific test function and requirements, and after that, I'd add my "done_testing();" and then "return exit_status();"
These are quite good guidelines, but not quite an example.

Thanks, Christian.

Previous: Christian CouderNext: Naomi Ibe
Message 3 of 4 in “[OUTREACHY] Final Application For Git Internshhip”
  1. Naomi IbeOct 24, 2023
  2. Christian CouderOct 25, 2023
  3. Christian CouderOct 28, 2023
  4. Naomi IbeOct 28, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.