JabRef / jabref

Graphical Java application for managing BibTeX and biblatex (.bib) databases
https://devdocs.jabref.org
MIT License
3.64k stars 2.59k forks source link

Added a test case in CitationKeyGeneratorTest.java file #12194

Open yoyounik opened 6 days ago

yoyounik commented 6 days ago

Add test case for LaTeX command stripping in filename generation

Description This PR adds a new test case to verify that LaTeX commands are correctly stripped from fields used for filename generation. Specifically, it checks if the generated filename removes commands like \mkbibquote while retaining the meaningful text.

The test case I added (testLatexCommandsAreStrippedFromCitationKey) verifies that LaTeX commands are stripped from the citation key when generating filenames. This aligns with the expected behavior described in the issue.

I could not run the test cases due to a dependency issue in my local setup.

Request: Please verify and run the test case to ensure it behaves as intended. If the current solution does not fully address the issue, feel free to make necessary corrections.

NOTE - This PR addresses this issue: https://github.com/JabRef/jabref/issues/12188#issuecomment-2480521276

yoyounik commented 6 days ago

hey @koppor I could not run the test cases due to a dependency issue in my local setup.

Request: Please verify and run the test case to ensure it behaves as intended. If the current solution does not fully address the issue, feel free to make necessary corrections and tell me if any changes i could make.

koppor commented 6 days ago

@yoyounik Please reference the issue this PR addresses.

yoyounik commented 4 days ago

@koppor In CitationKeyGeneratorTest.java file - its showing unable to recorgnize assertEquals but its already imported and being used

koppor commented 4 days ago

@koppor In CitationKeyGeneratorTest.java file - its showing unable to recorgnize assertEquals but its already imported and being used

You deleted the imports!

https://github.com/JabRef/jabref/commit/784f75670803e786b7ab20e63ad97ec3dc8bb734

Check the diff of your PR using the "Files" tab.

yoyounik commented 4 days ago

Hey @koppor two cases are failing, all other are working , can you give any suggestions on the file change i can do

koppor commented 4 days ago

Hey @koppor two cases are failing, all other are working , can you give any suggestions on the file change i can do

Depends on your goals. Do you want to learn something or just get this PR through?

Hint: Check the test output/ the message from the bot.