Skip to content

Commit

Permalink
Significant improvements on '\''Replace one-by-one'\'' and '\''Detail…
Browse files Browse the repository at this point in the history
…ed hits'\''
  • Loading branch information
aplteam committed Nov 27, 2019
1 parent c591613 commit 10b0837
Show file tree
Hide file tree
Showing 145 changed files with 769 additions and 790 deletions.
8 changes: 6 additions & 2 deletions APLSource/Fire/History.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
* The "Replace-one-by-one" list has now a context menu ("Select all" & "Deselect all")
* Bug fixes:
* The "Replace one-by-one" dialog moved down by the height of the menubar with every object.
* The report in the statusbar of the "Replace one-by-one" wa sometimes mutilated.
* The "Skip" button was active even when there were no more objects waiting ("Replace one-by-one").
* The report in the statusbar of the "Replace one-by-one" was sometimes mutilated.
* The "Skip" button in the "Replace one-by-one" dialog was active even when there were no more objects
waiting.
* The cause for the spurious "xyz cannot own abc" message in the status windows has been removed.
* Some acre-related test were not executed any more because they concluded (wrongly) that the version of
acre to be found in ⎕SE was outdated when in fact it was "too good".
* Internally: new test framework `Tester2` is now used.
\\
For information regarding older version see <https://github.com/aplteam/Fire/releases>
3 changes: 2 additions & 1 deletion APLSource/Fire/Replace/NonReplaceVars.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
~()1 2:1
~(⍴⍴)0 1:1
~/(¨)0 1:1
{}:1 It's a reference it seems!
Most throw a NONCE but some a DOMAIN ERROR and even a LENGTH ERROR (!) was seen:
This is caused by an overtake on a class instance where the constructor requires data
This is caused by an overtake on something like a class instance where the constructor requires just data
(,,' '){5 11 16:: 10}¨
}
4 changes: 2 additions & 2 deletions APLSource/Fire/ReportHits/RemoveFromHitReport.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
bool[,/rows2+¨1+¨length]0
buffer/bool
_##.A.WriteUtf8File file buffer
0##.G.Hits:
0=##.G.Hits:
bool~({(),'.',1}¨##.G.Hits)n.List.ReportInfo[rows;0]
##.G.Hitsbool##.G.Hits
_{#.G.NoOfHits##.G.Negate(+/+/¨[;5])()}(0<##.G.Hits)##.G.Hits
_{##.G.NoOfHits##.G.Negate(+/+/¨[;5])()}(0<##.G.Hits)##.G.Hits
##.G.NoOfObjects##.G.Hits
_0 ##.GUI.ReportHitsInStatusbar ##.G.(NoOfHits NoOfObjects),0 ''
Expand Down
12 changes: 6 additions & 6 deletions APLSource/Fire/ScanVars.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
:If 0dataref.varsName
:Return
:EndIf
:If ~Replace.NonReplaceVars data
dataIfLower data
:If 0<buff2 Scan((2>refvarsName)data)1
:If Replace.NonReplaceVars data
dataIfLower ⎕FMT data
buff2 Scan(data)1
:If 0<buff{0=: }buff
(ind length)buff
:EndIf
:Else
dataIfLower ⎕FMT data
buff2 Scan(data)1
:If 0<buff{0: }buff
dataIfLower data
:If 0<buff2 Scan((2>refvarsName)data)1
(ind length)buff
:EndIf
:EndIf
Expand Down
2 changes: 1 addition & 1 deletion APLSource/Fire/Version.aplf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rVersion
See also `History`
r(1¯1⎕NPARTS⎕THIS)'7.5.0.127' '2019-11-19'
r(1¯1⎕NPARTS⎕THIS)'7.5.0.135' '2019-11-27'
4 changes: 0 additions & 4 deletions APLSource/Test.aplf

This file was deleted.

1 change: 0 additions & 1 deletion APLSource/TestCases/Initial.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
ShowWarning
CopyTestData
#.TestData.GUI_Instance.Make Converts that namespace into a GUI. Is then name class 9.2
:Trap 0 {}⎕SE.UCMD'acre.Projects' :EndTrap
##.Fire.Reset
##.Fire.A##.APLTreeUtils
Done
5 changes: 5 additions & 0 deletions APLSource/TestCases/Initial_acre4.aplf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rInitial_acre4
:If 0=⎕SE.⎕NC'acre'
:Trap 0 {}⎕SE.UCMD'acre.Projects' :EndTrap
:EndIf
r9=⎕SE.⎕NC'acre'
13 changes: 0 additions & 13 deletions APLSource/TestCases/IsAcre2Or3.aplf

This file was deleted.

11 changes: 11 additions & 0 deletions APLSource/TestCases/IsAcre6OrBetter.aplf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
rIsAcre6OrBetter
Returns a 1 in case acre 6 or better is available
Used by some test cases in order to decide whether they should run or not.
:If r9=⎕SE.⎕NC'acre'
:Trap 6
{}⎕SE.acre._code.Version This works just in acre 6 and later
r1
:Else
r0
:EndTrap
:EndIf
2 changes: 1 addition & 1 deletion APLSource/TestCases/Prepare.aplf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Prepare
##.Tester.EstablishHelpersIn ⎕THIS
T⎕NEW ##.Tester2 ⎕THIS
8 changes: 4 additions & 4 deletions APLSource/TestCases/Test_HitReport_001.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RTest_HitReport_001(stopFlag batchFlag);n;n2;⎕TRAP
Exercise the "Hit Report". This test makes sure that the GUI shows and is what we expect.
⎕TRAP(999 'C' '. ⍝ Deliberate error')(0 'N')
R∆Failed
RT._Failed

Preconditions
1 #.Fire.Fire.Run 0
Expand All @@ -17,9 +17,9 @@
#.Fire.Fire.G.TestFlag1
n2#.Fire.Fire.ReportHits.Run 1
∆Process n.Form
GoToTidyUp 0n2.List.Items
GoToTidyUp'HTML Document'n2.Browser.Type
R∆OK
T.GoToTidyUp 0n2.List.Items
T.GoToTidyUp'HTML Document'n2.Browser.Type
RT._OK

∆TidyUp:
CloseFire
6 changes: 3 additions & 3 deletions APLSource/TestCases/Test_HitReport_002.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RTest_HitReport_002(stopFlag batchFlag);n;n2;⎕TRAP;expected;rg;GUI;html;body
Search for a text but ignore comments and anything between quotes.
⎕TRAP(999 'C' '. ⍝ Deliberate error')(0 'N')
R∆Failed
RT._Failed

#.⎕SHADOW'TEMP'
'TEMP'#.⎕NS''
Expand All @@ -22,9 +22,9 @@
∆Process n.Form

html1 #.Fire.Fire.ReportHits.Run 1
GoToTidyUp n.##.##.G.NoOfHits+/'<span class="diff">after</span>'html
T.GoToTidyUp n.##.##.G.NoOfHits+/'<span class="diff">after</span>'html

R∆OK
RT._OK

∆TidyUp:
CloseFire
6 changes: 3 additions & 3 deletions APLSource/TestCases/Test_HitReport_003.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RTest_HitReport_003(stopFlag batchFlag);n;n2;⎕TRAP;expected;rg;GUI;html
Search for `⎕IO` within Fire and checks the mark-wup in the "Hit report"
⎕TRAP(999 'C' '. ⍝ Deliberate error')(0 'N')
R∆Failed
RT._Failed

1 #.Fire.Fire.Run 0
n#.Fire.Fire.GUI.n
Expand All @@ -12,9 +12,9 @@
∆Process n.Form

html1 #.Fire.Fire.ReportHits.Run 1
GoToTidyUp n.##.##.G.NoOfHits+/'<span class="diff">⎕IO</span>'html
T.GoToTidyUp n.##.##.G.NoOfHits+/'<span class="diff">⎕IO</span>'html

R∆OK
RT._OK

∆TidyUp:
CloseFire
8 changes: 4 additions & 4 deletions APLSource/TestCases/Test_HitReport_004.aplf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RTest_HitReport_004(stopFlag batchFlag);n;⎕TRAP;expected;name;ref;html
Exercise a specific RegEx and then ask for "Hit Report". This checks a simple variable.
⎕TRAP(999 'C' '. ⍝ Deliberate error')(0 'N')
R∆Failed
RT._Failed

Preconditions
1 #.Fire.Fire.Run 0
Expand All @@ -19,12 +19,12 @@

{}∆Select n.StartBtn
∆Process n.Form
GoToTidyUp 1n.HitList.ReportInfo
T.GoToTidyUp 1n.HitList.ReportInfo
html1 ##.Fire.ReportHits.Run 1
expected'>this is <span class="diff">caspar</span> <span class="diff">david</span> <span class="diff">albrecht</span><'
GoToTidyUp 0=+/expectedhtml
T.GoToTidyUp 0=+/expectedhtml

R∆OK
RT._OK

∆TidyUp:
CloseFire
Expand Down
112 changes: 56 additions & 56 deletions APLSource/TestCases/Test_InternalMethods_001.aplf
Original file line number Diff line number Diff line change
@@ -1,130 +1,130 @@
RTest_InternalMethods_001(stopFlag batchFlag);⎕TRAP;code;CR;ss
Exercise Fire's "IsName" method.
⎕TRAP(999 'C' '. ⍝ Deliberate error')(0 'N')
R∆Failed
RT._Failed

CR⎕UCS 13

code'name←''path2ride'''
FailsIf 1#.Fire.Fire.IsName code'ride'
FailsIf 1#.Fire.Fire.IsName code'ride'
T.FailsIf 1#.Fire.Fire.IsName code'ride'
T.FailsIf 1#.Fire.Fire.IsName code'ride'

code'Header;NL;A'
FailsIf 1#.Fire.Fire.IsName code'NL'
FailsIf 1#.Fire.Fire.IsName code'NL'
T.FailsIf 1#.Fire.Fire.IsName code'NL'
T.FailsIf 1#.Fire.Fire.IsName code'NL'

code'Header;NL;A;NL;NLNL'
FailsIf 2#.Fire.Fire.IsName code'NL'
FailsIf 2#.Fire.Fire.IsName code'NL'
T.FailsIf 2#.Fire.Fire.IsName code'NL'
T.FailsIf 2#.Fire.Fire.IsName code'NL'

code'Header;⎕NL;A'
FailsIf~0#.Fire.Fire.IsName code'NL'
FailsIf~0#.Fire.Fire.IsName code'NL'
T.FailsIf~0#.Fire.Fire.IsName code'NL'
T.FailsIf~0#.Fire.Fire.IsName code'NL'

code'Header;X;Y;Z;',CR,'#.A.BB.C.NL.A←1'
FailsIf 1#.Fire.Fire.IsName code'NL'
T.FailsIf 1#.Fire.Fire.IsName code'NL'

code'Header;X;Y;Z;',CR,'BB.C.NL.A←1'
FailsIf 1#.Fire.Fire.IsName code'NL'
T.FailsIf 1#.Fire.Fire.IsName code'NL'

code'Header;X;Y;Z;',CR,'BB.C.NL←1'
FailsIf 1#.Fire.Fire.IsName code'NL'
T.FailsIf 1#.Fire.Fire.IsName code'NL'

code'Header;X;Y;Z;',CR,'⎕NL 3'
FailsIf~0#.Fire.Fire.IsName code'NL'
FailsIf~0#.Fire.Fire.IsName code'NL'
T.FailsIf~0#.Fire.Fire.IsName code'NL'
T.FailsIf~0#.Fire.Fire.IsName code'NL'

code'Header;X;Y;Z;',CR,'NLNLNL←1'
FailsIf~0#.Fire.Fire.IsName code'NL'
FailsIf~0#.Fire.Fire.IsName code'NL'
T.FailsIf~0#.Fire.Fire.IsName code'NL'
T.FailsIf~0#.Fire.Fire.IsName code'NL'

code'#.Foo.This←#.Foo.Fns 2'
FailsIf 2#.Fire.Fire.IsName code'Foo'
T.FailsIf 2#.Fire.Fire.IsName code'Foo'

ss'.Foo'
code'#.Foo.This←#.Foo.Fns 2'
FailsIf 2#.Fire.Fire.IsName code ss
T.FailsIf 2#.Fire.Fire.IsName code ss
ss'Foo.'
FailsIf 2#.Fire.Fire.IsName code ss
T.FailsIf 2#.Fire.Fire.IsName code ss
ss'.Foo.'
FailsIf 2#.Fire.Fire.IsName code ss
T.FailsIf 2#.Fire.Fire.IsName code ss

ss'Fns'
FailsIf 1#.Fire.Fire.IsName code ss
T.FailsIf 1#.Fire.Fire.IsName code ss
ss'.Fns'
FailsIf 1#.Fire.Fire.IsName code ss
T.FailsIf 1#.Fire.Fire.IsName code ss
ss'Fns.'
FailsIf~0#.Fire.Fire.IsName code ss
FailsIf~0#.Fire.Fire.IsName code ss
T.FailsIf~0#.Fire.Fire.IsName code ss
T.FailsIf~0#.Fire.Fire.IsName code ss
ss'.Fns.'
FailsIf~0#.Fire.Fire.IsName code ss
FailsIf~0#.Fire.Fire.IsName code ss
T.FailsIf~0#.Fire.Fire.IsName code ss
T.FailsIf~0#.Fire.Fire.IsName code ss

code'#.Foo.This←#.Foo.Fns 2'
FailsIf 2#.Fire.Fire.IsName code'#'
T.FailsIf 2#.Fire.Fire.IsName code'#'

code'#.Foo.This←#.Foo.Fns 2'
FailsIf 2#.Fire.Fire.IsName code'#.'
T.FailsIf 2#.Fire.Fire.IsName code'#.'

code'#.Foo.This←#.Foo.Fns 2'

code'abc.cd.Foo.This←#.Foo.Fns 2'
FailsIf 1#.Fire.Fire.IsName code'cd'
T.FailsIf 1#.Fire.Fire.IsName code'cd'

code'abc.cd.Foo.This←#.Foo.Fns 2'
FailsIf 1#.Fire.Fire.IsName code'abc'
T.FailsIf 1#.Fire.Fire.IsName code'abc'

code'abc.cd.Foo.This←#.Foo.Fns 2'
FailsIf 2#.Fire.Fire.IsName code'Foo'
T.FailsIf 2#.Fire.Fire.IsName code'Foo'

code'abc.cd.Foo.⍙←#.Foo.Fns 2'
FailsIf 1#.Fire.Fire.IsName code(,'')
T.FailsIf 1#.Fire.Fire.IsName code(,'')

code'abc.cd.Foo.⍙⍙←#.Foo.Fns 2'
FailsIf~0#.Fire.Fire.IsName code(,'')
FailsIf~0#.Fire.Fire.IsName code(,'')
T.FailsIf~0#.Fire.Fire.IsName code(,'')
T.FailsIf~0#.Fire.Fire.IsName code(,'')

code'abc.cd.Foo.∆←#.Foo.Fns 2'
FailsIf 1#.Fire.Fire.IsName code(,'')
T.FailsIf 1#.Fire.Fire.IsName code(,'')

code'abc.cd.∆∆.Foo←#.Foo.Fns 2'
FailsIf~0#.Fire.Fire.IsName code(,'')
FailsIf~0#.Fire.Fire.IsName code(,'')
T.FailsIf~0#.Fire.Fire.IsName code(,'')
T.FailsIf~0#.Fire.Fire.IsName code(,'')

code'abc.cd.Foo.This←#.Foo.Fns 2'
FailsIf 1#.Fire.Fire.IsName code'cd.Foo'
T.FailsIf 1#.Fire.Fire.IsName code'cd.Foo'

code'##.##.Foo.This←#.Foo.Fns 2'
FailsIf 1#.Fire.Fire.IsName code'#.'
FailsIf 1#.Fire.Fire.IsName code'##.##.'
FailsIf 1#.Fire.Fire.IsName code'##.##'
T.FailsIf 1#.Fire.Fire.IsName code'#.'
T.FailsIf 1#.Fire.Fire.IsName code'##.##.'
T.FailsIf 1#.Fire.Fire.IsName code'##.##'

code'vars←⎕SE.Foo←2'
FailsIf 1#.Fire.Fire.IsName code'⎕SE'
FailsIf 1#.Fire.Fire.IsName code'⎕SE'
T.FailsIf 1#.Fire.Fire.IsName code'⎕SE'
T.FailsIf 1#.Fire.Fire.IsName code'⎕SE'

code'vars←⎕SE.Foo←⎕SE.MyFns 2'
FailsIf 2#.Fire.Fire.IsName code'⎕SE'
FailsIf 2#.Fire.Fire.IsName code'⎕SE'
T.FailsIf 2#.Fire.Fire.IsName code'⎕SE'
T.FailsIf 2#.Fire.Fire.IsName code'⎕SE'

code'vars←⎕SE.Foo←⎕SE'
FailsIf 1#.Fire.Fire.IsName code'⎕SE.Foo'
FailsIf 1#.Fire.Fire.IsName code'⎕SE.Foo'
T.FailsIf 1#.Fire.Fire.IsName code'⎕SE.Foo'
T.FailsIf 1#.Fire.Fire.IsName code'⎕SE.Foo'

code'vars←⎕FREAD tno'
FailsIf 1#.Fire.Fire.IsName code'⎕FREAD'
FailsIf 1#.Fire.Fire.IsName code'⎕FREAD'
T.FailsIf 1#.Fire.Fire.IsName code'⎕FREAD'
T.FailsIf 1#.Fire.Fire.IsName code'⎕FREAD'

code'vars←⎕FOO tno'
FailsIf 1#.Fire.Fire.IsName code'⎕FOO'
FailsIf 1#.Fire.Fire.IsName code'⎕FOO'
T.FailsIf 1#.Fire.Fire.IsName code'⎕FOO'
T.FailsIf 1#.Fire.Fire.IsName code'⎕FOO'

code'f1'
FailsIf~0#.Fire.Fire.IsName code(,'f')
FailsIf~0#.Fire.Fire.IsName code(,'f')
T.FailsIf~0#.Fire.Fire.IsName code(,'f')
T.FailsIf~0#.Fire.Fire.IsName code(,'f')

code'#.abc.de'
FailsIf 1#.Fire.Fire.IsName code code
FailsIf 1#.Fire.Fire.IsName code code
T.FailsIf 1#.Fire.Fire.IsName code code
T.FailsIf 1#.Fire.Fire.IsName code code

R∆OK
RT._OK
Loading

0 comments on commit 10b0837

Please sign in to comment.