diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.st new file mode 100644 index 00000000..8c178caf --- /dev/null +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/expectedFailures.st @@ -0,0 +1,6 @@ +running +expectedFailures + + SystemVersion current major >= 12 ifTrue:[ ^ #() ]. + + ^ #(#testEmptyStatements) \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st index a7984364..13c0034b 100644 --- a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/rules.st @@ -5,4 +5,6 @@ rules addAll: GRSlimeBlockLintRule allSubclasses; addAll: GRSlimeParseTreeLintRule allSubclasses; addAll: GRSlimeTransformationRule allSubclasses; + add: ReMultiplePeriodsTerminatingStatementRule; + add: ReMethodSignaturePeriodRule; yourself) reject: #isAbstract \ No newline at end of file diff --git a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st index 352c6fdc..7e3c3a62 100644 --- a/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st +++ b/repository/Grease-Tests-Pharo-Slime.package/GRReSlimeTest.class/instance/testEmptyStatements.st @@ -1,15 +1,18 @@ tests-block testEmptyStatements "We added this test to make sure that this Pharo-supplied rule works because we previously had this one in Grease and it is important." - | class | class := self defineSubClassOf: #GRObject. - self compile: 'emptyStatement1. self and' in: class. - self compile: 'emptyStatement2 self and..' in: class. - self compile: 'emptyStatement3 self and."foo".' in: class. - self compile: 'emptyStatement4 self and."foo".self and' in: class. + self compile: 'emptyStatement1.', (String with: Character cr), ' self and' in: class. + self compile: 'emptyStatement2', (String with: Character cr), ' self and..' in: class. + self compile: 'emptyStatement3', (String with: Character cr), ' self and."foo".' in: class. + self compile: 'emptyStatement4', (String with: Character cr), ' self and."foo".self and' in: class. self assertRule: ReMultiplePeriodsTerminatingStatementRule - matches: { class>>#emptyStatement1 . class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 } - ignoring: (Array with: ReUnnecessaryLastPeriodRule) \ No newline at end of file + matches: { class>>#emptyStatement2 . class>>#emptyStatement3 . class>>#emptyStatement4 } + ignoring: { ReMethodSignaturePeriodRule }. + self + assertRule: ReMethodSignaturePeriodRule + matches: { class>>#emptyStatement1 } + ignoring: { ReMultiplePeriodsTerminatingStatementRule }. \ No newline at end of file