Skip to content

Instantly share code, notes, and snippets.

@andreoss
Created September 12, 2020 10:53
Show Gist options
  • Save andreoss/07a248a0b6fb0d1b44647c02a9391969 to your computer and use it in GitHub Desktop.
Save andreoss/07a248a0b6fb0d1b44647c02a9391969 to your computer and use it in GitHub Desktop.
find src/test/ -name '*Test.java' -o -name '*ITCase.java' -exec perl -007 -i -pE 'unless($_ =~ /@Test\(expected/xgsm || $_ =~ /@(Class)?Rule/xgsm) { s/^public final class/final class/sgm; s/@Test^\s{4}public void/ void/sgm; s/org.junit.Test/org.junit.jupiter.api.Test/}' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment