import tests
This commit is contained in:
parent
ec4db6dbad
commit
56a6a08b97
20
test/cases/imports.bqn
Normal file
20
test/cases/imports.bqn
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
%DEF file (
|
||||||
|
path0 ← •path•file.At"../imports/"
|
||||||
|
File ← {path0 •file.At 𝕩}
|
||||||
|
CleanPath ← ! {r←•file.RealPath path0 ⋄ ≠i←/r ⍷ 𝕩? (⋈⁼i)(↑∾"..."∾(≠r)⊸+⊸↓)𝕩; 𝕩}∘•CurrentError∘@
|
||||||
|
)
|
||||||
|
(
|
||||||
|
%USE file
|
||||||
|
i1 ← •Import File "show.bqn" ⋄ ! "show.bqn"‿⟨⟩ ≡ 1↓i1
|
||||||
|
i2 ← •Import File "show.bqn" ⋄ ! "show.bqn"‿⟨⟩ ≡ 1↓i2
|
||||||
|
! i1 ≡ i2
|
||||||
|
)
|
||||||
|
|
||||||
|
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic.bqn"
|
||||||
|
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic.bqn"
|
||||||
|
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic.bqn"
|
||||||
|
!"•Import: cyclic import of "".../cyclic_A.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic_A.bqn"
|
||||||
|
!"•Import: cyclic import of "".../cyclic_B.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic_B.bqn"
|
||||||
|
!"•Import: cyclic import of "".../cyclic_A.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic_B.bqn"
|
||||||
|
!"•Import: cyclic import of "".../cyclic_B.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic_A.bqn"
|
||||||
|
%USE file ⋄ 3 •Import File "notCyclic.bqn" %% 30
|
||||||
1
test/imports/cyclic.bqn
Normal file
1
test/imports/cyclic.bqn
Normal file
@ -0,0 +1 @@
|
|||||||
|
•Import"cyclic.bqn"
|
||||||
1
test/imports/cyclic_A.bqn
Normal file
1
test/imports/cyclic_A.bqn
Normal file
@ -0,0 +1 @@
|
|||||||
|
•Import"cyclic_B.bqn"
|
||||||
1
test/imports/cyclic_B.bqn
Normal file
1
test/imports/cyclic_B.bqn
Normal file
@ -0,0 +1 @@
|
|||||||
|
•Import"cyclic_A.bqn"
|
||||||
1
test/imports/notCyclic.bqn
Normal file
1
test/imports/notCyclic.bqn
Normal file
@ -0,0 +1 @@
|
|||||||
|
{•args≡0? 0; 10+(•args-1) •Import "notCyclic.bqn"}
|
||||||
1
test/imports/show.bqn
Normal file
1
test/imports/show.bqn
Normal file
@ -0,0 +1 @@
|
|||||||
|
⟨{⇐}, "show.bqn", •args⟩
|
||||||
@ -167,7 +167,7 @@ Run ← { 𝕊 testname:
|
|||||||
{
|
{
|
||||||
¬ok? Bad "Expected value, but got error: "∾got;
|
¬ok? Bad "Expected value, but got error: "∾got;
|
||||||
got •internal.EEqual exp? @;
|
got •internal.EEqual exp? @;
|
||||||
⟨"Expected: "∾•Repr exp ⋄ "Got: "∾•Repr got⟩ Bad "Wrong value"
|
⟨"Expected: "∾•Repr exp ⋄ "Got: "∾•Repr⎊•Show got⟩ Bad "Wrong value"
|
||||||
@
|
@
|
||||||
}
|
}
|
||||||
@
|
@
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user