-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
139 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
r←Version | ||
⍝ See also `History` | ||
r←'Fire' '9.6.3+284' '2024-04-04' | ||
r←'Fire' '9.6.4+286' '2024-05-02' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
R←Test_Replace_068(stopFlag batchFlag);n;Text;n2;⎕TRAP;expected;tempDir;res;parms | ||
⍝ Replace a string in a function that changes the name; check whether Link is informed | ||
⎕TRAP←(999 'C' '. ⍝ Deliberate error')(0 'N') | ||
R←T._Failed | ||
|
||
⍝ Preconditions | ||
1 #.Fire.Fire.Run 0 | ||
n←#.Fire.Fire.GUI.n | ||
|
||
tempDir←FilesAndDirs.GetTempSubDir↑⎕SI | ||
#.⎕SHADOW'TEMP' | ||
'TEMP'#.⎕NS'' | ||
#.TEMP.⎕FX'r←Foo' 'r←42' | ||
parms←⎕NS'' | ||
parms.watch←'ns' | ||
res←parms ⎕SE.Link.Create'#.TEMP'tempDir | ||
Assert res≡'Linked: #.TEMP → ',tempDir | ||
Assert('.linkconfig' 'Foo.aplf')≡{↑,/1↓⎕NPARTS ⍵}¨↑FilesAndDirs.Dir tempDir,'/' | ||
|
||
n.SearchFor.Text←'Foo' | ||
n.StartSearchIn.Text←'#.TEMP' | ||
n.(Case APL_Name).State←1 | ||
|
||
{}∆Select n.StartBtn | ||
∆Process n.Form | ||
→T.GoToTidyUp(,⊂'Foo')≢n.HitList.Items | ||
expected←,⊂'#.TEMP' | ||
→T.GoToTidyUp expected≢n.HitList.ReportInfo[;0] | ||
|
||
{}∆Select n.ReplaceBtn | ||
∆Process n.Form | ||
|
||
n2←#.Fire.Fire.Replace.n | ||
n2.ReplaceBy.Text←'TheAnswerIs' | ||
|
||
{}∆Select n2.StartBtn | ||
∆Process n.Form | ||
→T.GoToTidyUp 1≠#.Fire.Fire.Replace.NoOfReplacements | ||
→T.GoToTidyUp' r←Foo' ' r←42'≢⎕NR'#.TEMP.Foo' | ||
→T.GoToTidyUp 42≢#.TEMP.TheAnswerIs | ||
→T.GoToTidyUp~(,⊂'TheAnswerIs.aplf')∊{↑,/1↓⎕NPARTS ⍵}¨↑FilesAndDirs.Dir tempDir,'/' | ||
|
||
R←T._OK | ||
|
||
∆TidyUp: | ||
CloseFire | ||
{}⎕SE.Link.Break'#.TEMP' | ||
#.⎕EX'TEMP' | ||
{}FilesAndDirs.RmDirByForce tempDir | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
R←Test_Replace_069(stopFlag batchFlag);n;Text;n2;⎕TRAP;expected;tempDir;res;parms | ||
⍝ Replace a string in a script that changes the name of the script; check whether Link is informed | ||
⎕TRAP←(999 'C' '. ⍝ Deliberate error')(0 'N') | ||
R←T._Failed | ||
|
||
⍝ Preconditions | ||
1 #.Fire.Fire.Run 0 | ||
n←#.Fire.Fire.GUI.n | ||
|
||
tempDir←FilesAndDirs.GetTempSubDir↑⎕SI | ||
#.⎕SHADOW'TEMP' | ||
'TEMP'#.⎕NS'' | ||
#.TEMP.⎕FIX':Namespace Foo' '∇r←Get' 'r←42' '∇' ':EndNamespace' | ||
parms←⎕NS'' | ||
parms.watch←'ns' | ||
res←parms ⎕SE.Link.Create'#.TEMP'tempDir | ||
Assert res≡'Linked: #.TEMP → ',tempDir | ||
Assert('.linkconfig' 'Foo.apln')≡{↑,/1↓⎕NPARTS ⍵}¨↑FilesAndDirs.Dir tempDir,'/' | ||
|
||
n.SearchFor.Text←'Foo' | ||
n.StartSearchIn.Text←'#.TEMP' | ||
n.(Case APL_Name).State←1 | ||
|
||
{}∆Select n.StartBtn | ||
∆Process n.Form | ||
→T.GoToTidyUp(,⊂'Foo')≢n.HitList.Items | ||
expected←,⊂'#.TEMP' | ||
→T.GoToTidyUp expected≢n.HitList.ReportInfo[;0] | ||
|
||
{}∆Select n.ReplaceBtn | ||
∆Process n.Form | ||
|
||
n2←#.Fire.Fire.Replace.n | ||
n2.ReplaceBy.Text←'TheAnswerIs' | ||
|
||
{}∆Select n2.StartBtn | ||
∆Process n.Form | ||
→T.GoToTidyUp 1≠#.Fire.Fire.Replace.NoOfReplacements | ||
→T.GoToTidyUp 42≢#.TEMP.Foo.Get | ||
→T.GoToTidyUp 42≢#.TEMP.TheAnswerIs.Get | ||
→T.GoToTidyUp~(,⊂'TheAnswerIs.apln')∊{↑,/1↓⎕NPARTS ⍵}¨↑FilesAndDirs.Dir tempDir,'/' | ||
|
||
R←T._OK | ||
|
||
∆TidyUp: | ||
CloseFire | ||
{}⎕SE.Link.Break'#.TEMP' | ||
#.⎕EX'TEMP' | ||
{}FilesAndDirs.RmDirByForce tempDir | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.