Skip to content

Commit b6ba282

Browse files
committed
Tests corrected
1 parent 7b24498 commit b6ba282

21 files changed

+37
-33
lines changed

APLSource/InitProject.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
InitProject y
2-
:If 1 ⎕SE.Latest.CommTools.YesOrNo'RootRather⎕SE@Would you like to run #.Latest.Run rather than ⎕SE.Latest.Run?'
2+
:If 1 #.Latest.Latest.CommTools.YesOrNo'RootRather⎕SE@Would you like to run #.Latest.Run rather than ⎕SE.Latest.Run?'
33
⎕SE.Latest.∆EXEC_IN_PROJECT←1
44
:EndIf

APLSource/Latest/GetLinks.aplf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
(op path name list)←GetLinks dummy;ind
2-
⍝ op is 1 if the user has cancelled, ohtherwise 0
1+
(op path name list)←GetLinks includeQSE;ind
2+
⍝ op is 1 if the user has cancelled, ohtherwise 0.
33
path←name←''
44
op←0
55
:If 2=⍴⍴list←1↓⎕SE.Link.Status'' ⍝ Otherwise it is a message rather than a real result
6+
:If ~includeQSE
7+
list←('⎕SE.'∘≢¨1 ⎕C 4↑¨list[;0])⌿list
8+
:EndIf
69
:AndIf 0<≢list ⍝ Once Link become a real API...
710
('No LINKs detected')⎕SIGNAL 11/⍨0=≢list
811
:If 1<≢list

APLSource/Latest/Run.aplf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(r name)←Run(path recursive stats allFiles noOf);F;A;linkList;pathFlag;path;dates;buff;cancelled;caption;ind
1+
(r name)←Run(path recursive stats allFiles noOf includeQSE);F;A;linkList;pathFlag;path;dates;buff;cancelled;caption;ind
22
⍝ Handles the following cases:
33
⍝ * Investigate any LINKed namespaces
44
⍝ * Investigate the workspace (simple namespace or #/⎕SE)
@@ -8,7 +8,7 @@
88
r←name←linkList←''
99
pathFlag←0
1010
:If 0=≢path ⍝ Only true if we deal with a LINK
11-
(cancelled path name linkList)←GetLinks
11+
(cancelled path name linkList)←GetLinks includeQSE
1212
→cancelled/0
1313
:If 0=≢path
1414
path←F.PWD,F.CurrentSep

APLSource/Latest/Version.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
⍝ See also `History`
33
⎕ML←1 ⋄ ⎕IO←1
44
json←⎕JSON⍠('Dialect' 'JSON5')⊣⊃⎕NGET TatinVars.HOME,'/apl-package.json'
5-
r←'Latest'json.version'2024-01-05'
5+
r←'Latest'json.version'2024-01-11'

APLSource/Latest_uc.dyalog

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
r.Desc'Prints some/all objects found in either a folder or in the workspace, sorted by their "Changed" date'
99
r.Group'FN'
1010
Parsing rules for each:
11-
r.Parse' -recursive∊0 1 -stats -allFiles -version -days='
11+
r.Parse' -recursive∊0 1 -stats -allFiles -version -days= -se'
1212
1313

14-
rRun(Cmd Args);⎕IO;⎕ML;stats;noOf;flag;value;ref;recursive;path;allFiles;version;from;to;b;list;row;L;openCiderProjects;caption;name;f1;f2;days
14+
rRun(Cmd Args);⎕IO;⎕ML;stats;noOf;flag;value;ref;recursive;path;allFiles;version;from;to;b;list;row;L;openCiderProjects;caption;name;f1;f2;days;includeQSE
1515
:Access Shared Public
1616
⎕IO1 ⎕ML3
1717
version0 Args.Switch'version'
@@ -37,6 +37,7 @@
3737
statsArgs.Switch'stats' default is empty
3838
allFiles0 Args.Switch'allFiles'
3939
days0 Args.Switch'days'
40+
includeQSE0 Args.Switch'se'
4041
path''
4142
:If 2=Args.Arguments
4243
path1Args.Arguments
@@ -99,7 +100,7 @@
99100
:If 0days
100101
noOf-|days
101102
:EndIf
102-
(r name)L.Run(path recursive stats allFiles noOf)
103+
(r name)L.Run(path recursive stats allFiles noOf includeQSE)
103104
(0=+/¨r name)/0
104105
:If stats
105106
:If 0<name
@@ -158,6 +159,7 @@
158159
r,'-days= Number of days changes should be reported on. You must not specify'
159160
r,' an integer when specifying this.'
160161
r,'-recursive=0|1 Defaults to 1, meaning that the path is searched recursively.'
162+
r,'-se By default linked namespaces in ⎕SE are ignored. Change with -se.'
161163
r,'-stats If this flag is specified you get a matrix with change statistics;'
162164
r,' any other flag is ignored'
163165
r,'-version Prints the version number of the user command to the session.'

APLSource/TestCases/Test_API_100.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
R←T._Failed
55

66
:Trap 6
7-
(res name)←##.Latest.Run'#.DoesNotExist' 0 0 0 0
7+
(res name)←##.Latest.Run'#.DoesNotExist' 0 0 0 0 0
88
→T.FailsIf 1
99
:Else
1010
qdmx←⎕DMX

APLSource/TestCases/Test_API_110.aplf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@
33
⎕TRAP←(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N')
44
R←T._Failed
55

6-
(data name)←##.Latest.Run'#.TEMP' 1 0 0 ¯1
6+
(data name)←##.Latest.Run'#.TEMP' 1 0 0 ¯1 0
77
→T.PassesIf 1=≢data
88
→T.PassesIf name≡'#.TEMP'
99
→T.PassesIf'2100-02-01 17:00:00'≡2⊃data[1;]
1010

11-
(data name)←##.Latest.Run'#.TEMP' 1 0 0 ¯2
11+
(data name)←##.Latest.Run'#.TEMP' 1 0 0 ¯2 0
1212
→T.PassesIf 2=≢data
1313
expected←'#.TEMP.Hello3' '#.TEMP.Sub2.Hello7'
1414
→T.PassesIf expected≡data[;1]
1515
expected←'2100-01-03 14:00:00' '2100-02-01 17:00:00'
1616
→T.PassesIf expected≡data[;2]
1717

18-
(data name)←##.Latest.Run'#.TEMP' 1 0 0 21000102
18+
(data name)←##.Latest.Run'#.TEMP' 1 0 0 21000102 0
1919
→T.PassesIf 2=≢data
2020
expected←'#.TEMP.Sub2.Hello6' '#.TEMP.Hello2'
2121
→T.PassesIf expected≡data[;1]
2222
expected←'2100-01-02 12:00:00' '2100-01-02 13:00:00'
2323
→T.PassesIf expected≡data[;2]
2424

25-
(data name)←##.Latest.Run'#.TEMP' 1 0 0 ¯999 ⍝ All
25+
(data name)←##.Latest.Run'#.TEMP' 1 0 0 ¯999 0 ⍝ All
2626
→T.PassesIf(≢data)=⌈/{⊃⊃(//)⎕VFI ¯1↑⍵}¨data[;1] ⍝ Works because the functions are numbered
2727

28-
(data name)←##.Latest.Run'#.TEMP' 1 0 0 1
28+
(data name)←##.Latest.Run'#.TEMP' 1 0 0 1 0
2929
→T.PassesIf 1=≢data
3030
→T.PassesIf'#.TEMP.Sub2.Hello7'≡1⊃data[1;]
3131

32-
(data name)←##.Latest.Run'#.TEMP' 1 0 0 3
32+
(data name)←##.Latest.Run'#.TEMP' 1 0 0 3 0
3333
→T.PassesIf 3=≢data
3434
expected←'#.TEMP.Hello2' '#.TEMP.Hello3' '#.TEMP.Sub2.Hello7'
3535
→T.PassesIf expected≡data[;1]

APLSource/TestCases/Test_API_120.aplf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
⎕TRAP←(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N')
44
R←T._Failed
55

6-
(data name)←##.Latest.Run'#' 1 0 0 ¯999
6+
(data name)←##.Latest.Run'#' 1 0 0 ¯999 0
77
noOf←≢data
88
→T.PassesIf 7<noOf
99
→T.PassesIf'#'≡name
1010

11-
(data name)←##.Latest.Run'#' 1 0 0 ¯999
11+
(data name)←##.Latest.Run'#' 1 0 0 ¯999 0
1212
→T.PassesIf noOf=≢data
1313

14-
(data name)←##.Latest.Run'#' 1 0 0 21000101
14+
(data name)←##.Latest.Run'#' 1 0 0 21000101 0
1515
→T.PassesIf 3=≢data
1616

17-
(data name)←##.Latest.Run'#' 1 0 0(21000101 21000131)
17+
(data name)←##.Latest.Run'#' 1 0 0(21000101 21000131) 0
1818
→T.PassesIf 6=≢data
1919

2020
R←T._OK

APLSource/TestCases/Test_API_130.aplf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
⎕TRAP←(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N')
44
R←T._Failed
55

6-
(data name)←##.Latest.Run'#.TEMP' 1 1 0 ⍬
6+
(data name)←##.Latest.Run'#.TEMP' 1 1 0 ⍬ 0
77
⍝ recursive stats allFiles noOf links
88
→T.PassesIf 4=≢data
99
→T.PassesIf 7=+/data[;2]
1010

11-
(data name)←##.Latest.Run'#' 1 1 0 ⍬
11+
(data name)←##.Latest.Run'#' 1 1 0 ⍬ 0
1212
→T.PassesIf 4<≢data
1313
→T.PassesIf 7<+/data[;2]
1414

APLSource/TestCases/Test_API_160.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
R←T._Failed
66

7-
(data name)←##.Latest.Run ##.Latest.TatinVars.HOME 1 0 1 9999
7+
(data name)←##.Latest.Run ##.Latest.TatinVars.HOME 1 0 1 9999 0
88
→T.PassesIf 0<≢data
99
→T.PassesIf 0=≢name
1010

0 commit comments

Comments
 (0)