Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Mar 20, 2024
2 parents b44b985 + 4035da1 commit 90a7fd1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions filters/delete-unparseable.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
import javalang

if __name__ == '__main__':
if len(sys.argv) != 3:
print("Usage: python delete-unparseable.py <path to the .java file> <output file with .java files>")
sys.exit(1)

JAVA: str = sys.argv[1]
LST: str = sys.argv[2]
try:
Expand Down
14 changes: 14 additions & 0 deletions tests/filters/test-040-delete-unparseable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ stdout=$2
} > "${stdout}" 2>&1
echo "👍🏻 An unparseable Java file was deleted"

{
if ! "${LOCAL}/filters/delete-unparseable.py" > "${temp}/message"; then
grep "Usage: python delete-unparseable.py <path to the .java file> <output file with .java files>" "${temp}/message"
fi

if ! "${LOCAL}/filters/delete-unparseable.py" "${java}" > "${temp}/message"; then
grep "Usage: python delete-unparseable.py <path to the .java file> <output file with .java files>" "${temp}/message"
fi

if ! "${LOCAL}/filters/delete-unparseable.py" "${java}" "${temp}/stdout" "${temp}/stdout" > "${temp}/message"; then
grep "Usage: python delete-unparseable.py <path to the .java file> <output file with .java files>" "${temp}/message"
fi
} > "${stdout}" 2>&1
echo "👍🏻 Usage works correctly"

0 comments on commit 90a7fd1

Please sign in to comment.