Skip to content

Commit

Permalink
Make
Browse files Browse the repository at this point in the history
  • Loading branch information
aplteam committed Sep 30, 2024
2 parents a4cbb10 + f7205e7 commit 5270495
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 35 deletions.
2 changes: 1 addition & 1 deletion APLSource/Client/GetMyUCMDsFolder.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:EndIf
add{(((~'/\')0)/'/'),}add
:If Reg.IsWindows
r##.FilesAndDirs.ExpandPath GetUserDocumentsFolder,'..\MyUCMDs',add
r##.FilesAndDirs.ExpandPath GetUserDocumentsFolder,'MyUCMDs',add
:Else
r(2 ⎕NQ'.' 'GetEnvironment' 'Home'),'/MyUCMDs',add
:EndIf
Expand Down
19 changes: 12 additions & 7 deletions APLSource/Client/GetProgramFilesFolder.aplf
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
r{current}GetProgramFilesFolder postFix;version;aplVersion;OS
r{current}GetProgramFilesFolder subFolder;version;aplVersion;OS
Returns path to Dyalog's program files folder.\\
Comes always with a trailing separator.\\
* By default it returns the version agnostic folder
* If ⍺=1 then it returns the folder for the currently running APL
Works on all platforms but returns different results.\\
Under Windows typically:\\
`C:\Users\<⎕AN>\Documents\Dyalog APL Files' ←→ GetProgramFilesFolder ''
without OneDrive or, with OneDrive:
`C:\Users\<⎕AN>\OneDrive\Documents\Dyalog APL Files' ←→ GetProgramFilesFolder ''
When a 1 is passed as ⍺ and it's running on 19.0-64 bit Unicode:
`C:\Users\<⎕AN>\Documents\Dyalog APL[-64] 19.0 Unicode Files' ←→ 1 GetProgramFilesFolder ''
`C:\Users\<⎕AN>\Documents\Dyalog APL-64 19.0 Unicode Files' ←→ 1 GetProgramFilesFolder ''
or, with OneDrive:
`C:\Users\<⎕AN>\OneDrive\Documents\Dyalog APL-64 19.0 Unicode Files' ←→ 1 GetProgramFilesFolder ''
current{0<⎕NC : 0}'current'
OS31# ⎕WG'APLVersion'
postFix##.FilesAndDirs.AddTrailingSep postFix
subFolder,{(~(¯1)'/\')/'/'}subFolder
aplVersion# ⎕WG'APLVersion'
:If current
:If OS'Win'
rGetCurrentAPLsFolderInDocuments,postFix
rGetCurrentAPLsFolderInDocuments,{-(,'/')}subFolder
:Else
version({'.'~/2>+\='.'}2aplVersion),((80=⎕DR' ')/'U'),((1+/'-64'1aplVersion)'32' '64')
r(⎕SH'echo $HOME'),'/dyalog.',version,'.files',postFix
r(⎕SH'echo $HOME'),'/dyalog.',version,'.files',subFolder
:EndIf
:Else
:If OS'Win'
rGetUserDocumentsFolder,'Dyalog APL Files',postFix
rGetUserDocumentsFolder,'Dyalog APL Files',{0<~'/\':'/', }subFolder
:Else
r(⎕SH'echo $HOME'),'/dyalog.files',postFix
r(⎕SH'echo $HOME'),'/dyalog.files',subFolder
:EndIf
:EndIf
3 changes: 2 additions & 1 deletion APLSource/Client/GetUserDocumentsFolder.aplf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
rGetUserDocumentsFolder
Get user documents folder. Works okay when the Documents/ folder is on OneDrive.
r⎕NPARTS GetCurrentAPLsFolderInDocuments
Comes always with a trailing separator.
r⎕NPARTS ¯1GetCurrentAPLsFolderInDocuments
2 changes: 1 addition & 1 deletion APLSource/Registry/Version.aplf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rVersion
See also `History`
r'Tatin' '0.114.0+1977' '2024-09-30'
r'Tatin' '0.114.0+1978' '2024-09-30'
29 changes: 17 additions & 12 deletions APLSource/TestCases/Prepare.aplf
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Prepare;testFilename;ask;answer;ignore
{codeCoverageFlag}Prepare;testFilename;ask;answer;ignore
'This WS appears to be prepared for running as a Tatin Server'⎕SIGNAL 11/0<##.Client.⎕NC''
'Not enough memory: should provide at least 128MB for the tests'Assert 100<247813016÷1024×1024
:If 0=##.Client.⎕NC'MyUserSettings'
##.Admin.Initialize_Client
:EndIf
T⎕NEW ##.Tester2 ⎕THIS
codeCoverageFlag0

⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝ Might become usesul again one day ⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
:If 0 ##.Client.YesOrNo'Check Temp\ folder for left-overs?'
Expand All @@ -25,23 +27,26 @@

testFilename##.Admin.GetCoverageFilename
:If ⎕NEXISTS testFilename,'.profile'
ask{,'; 1=append, 2=replace' a ~(a)1 2: a}
ask{,'; 1=append, 2=replace, 3=no code coverage' a ~(a)1 2 3: a}
answerask'Coverage file already exists'
:If 2answer
1 ⎕NDELETE testFilename,'.profile'
1 ⎕NDELETE testFilename,'.cr'
:EndIf
:EndIf
T.codeCoverage⎕NEW ##.CodeCoverage(,'#.Tatin.Client,#.Tatin.Registry,#.Tatin.Server')
T.codeCoverage.filenametestFilename
ignore''
ignore,'#.Tatin.Client.InitUserSettings'
ignore,'#.Tatin.Registry.Create_UUID'
ignore,'#.Tatin.Client.GetUserHomeFolder'
ignore,'#.Tatin.Client.PublishPackageToRemoteRegistry_2'
ignore,'#.Tatin.Client.CreateAllRefs_Client'
ignore,'#.Tatin.Client.GetMyUCMDsFolder'
T.codeCoverage.ignore{,',',}/ignore
codeCoverageFlaganswer1 2
:If 3answer
T.codeCoverage⎕NEW ##.CodeCoverage(,'#.Tatin.Client,#.Tatin.Registry,#.Tatin.Server')
T.codeCoverage.filenametestFilename
ignore''
ignore,'#.Tatin.Client.InitUserSettings'
ignore,'#.Tatin.Registry.Create_UUID'
ignore,'#.Tatin.Client.GetUserHomeFolder'
ignore,'#.Tatin.Client.PublishPackageToRemoteRegistry_2'
ignore,'#.Tatin.Client.CreateAllRefs_Client'
ignore,'#.Tatin.Client.GetMyUCMDsFolder'
T.codeCoverage.ignore{,',',}/ignore
:EndIf

A##.APLTreeUtils2
F##.FilesAndDirs
Expand Down
7 changes: 4 additions & 3 deletions APLSource/TestCases/RunTests.aplf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
RunTests;htmlFilename;log;rc
Prepare
RunTests;htmlFilename;log;rc;codeCoverageFlag
codeCoverageFlagPrepare
(rc log)T.Run 1

:If 0 ##.Client.YesOrNo'View CodeCoverage report?'
:If codeCoverageFlag
:AndIf 0 ##.Client.YesOrNo'View CodeCoverage report?'
htmlFilename##.CodeCoverage.ProcessDataAndCreateReport T.codeCoverage.filename
##.APLTreeUtils2.GoToWebPage htmlFilename
:EndIf
3 changes: 3 additions & 0 deletions APLSource/TestCases/Test_UC_800.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#.⎕SHADOW'TEMP' 'TEMP'#.⎕NS'' Used to load stuff into
zipFilename'file://',##.CiderConfig.HOME,'/TestData/ZIP-file/aplteam-APLGit-0.24.0.zip'
aliasFilename⎕SE.Cider.GetCiderAliasFilename
:If ~⎕NEXISTS aliasFilename
('')##.FilesAndDirs.NPUT aliasFilename
:EndIf
aliase##.FilesAndDirs.NGET aliasFilename 1
alias(⎕SI)~'_'
targetDir∆GetTempDir''
Expand Down
2 changes: 1 addition & 1 deletion TestData/Build/Default/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLSource/Seven7Zip.aplc",
tags: "zip-tools",
userCommandScript: "",
version: "9.0.1+516",
version: "9.0.1+518",
}
2 changes: 1 addition & 1 deletion TestData/Build/NuGet1/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLSource",
tags: "dotnet,nuget,packages",
userCommandScript: "",
version: "0.2.1+58",
version: "0.2.1+59",
}
2 changes: 1 addition & 1 deletion TestData/Build/NuGet2/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLSource",
tags: "dotnet,nuget,packages",
userCommandScript: "",
version: "0.2.1+111",
version: "0.2.1+113",
}
2 changes: 1 addition & 1 deletion TestData/Build/Special/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLSource/Seven7Zip.aplc",
tags: "zip-tools",
userCommandScript: "",
version: "9.0.1+717",
version: "9.0.1+720",
}
2 changes: 1 addition & 1 deletion TestData/Build/UserCommand/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLSource/APLGit2ForTests",
tags: "apl-git-interface",
userCommandScript: "APLSource/APLGit2ForTests_UC.dyalog",
version: "0.9.0+480",
version: "0.9.0+481",
}
2 changes: 1 addition & 1 deletion TestData/DifferentCase/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLprocess.aplc",
tags: "process",
userCommandScript: "",
version: "20.99.99+2804",
version: "20.99.99+2805",
}
2 changes: 1 addition & 1 deletion TestData/Source/APLTree/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "APLTreeUtils.apln",
tags: "",
userCommandScript: "",
version: "6.0.0+233",
version: "6.0.0+234",
}
2 changes: 1 addition & 1 deletion TestData/Source/F-D/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "FilesAndDirs.aplc",
tags: "",
userCommandScript: "",
version: "3.0.0+233",
version: "3.0.0+234",
}
2 changes: 1 addition & 1 deletion TestData/Source/OS/apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
source: "OS.aplc",
tags: "foo,boo",
userCommandScript: "",
version: "2.0.0+749",
version: "2.0.0+752",
}
2 changes: 1 addition & 1 deletion TestData/tatin-client.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ registries: [ { alias: "local", api_key: "", port: 0, priority: 1000, uri: "/private/tmp/Tatin-Test-Registry_203052213_0", }, { alias: "tatin", api_key: "", port: 0, priority: 100, uri: "https://tatin.dev/", }, { alias: "localhost", api_key: "Test-API-Key", port: 5001, priority: 90, uri: "https://localhost/", }, { alias: "tatin-test", api_key: "Tatin-Test-API-Key", port: 0, priority: 0, uri: "https://test.tatin.dev/", }, ], source: "",}
{ registries: [ { alias: "local", api_key: "", port: 0, priority: 1000, uri: "C:\\Users\\kai\\AppData\\Local\\Temp\\Tatin-Test-Registry_92436282_0", }, { alias: "tatin", api_key: "", port: 0, priority: 100, uri: "https://tatin.dev/", }, { alias: "localhost", api_key: "Test-API-Key", port: 5001, priority: 90, uri: "https://localhost/", }, { alias: "tatin-test", api_key: "Tatin-Test-API-Key", port: 0, priority: 0, uri: "https://test.tatin.dev/", }, ], source: "",}
Expand Down

0 comments on commit 5270495

Please sign in to comment.