unison/unison-src/transcripts/move-all.md
2024-06-25 11:12:43 -07:00

971 B

Tests for move

scratch/main> builtins.merge

Happy Path - namespace, term, and type

Create a term, type, and namespace with history

Foo = 2
unique type Foo = Foo
Foo.termInA = 1
unique type Foo.T = T
scratch/main> add
Foo.termInA = 2
unique type Foo.T = T1 | T2
scratch/main> update

Should be able to move the term, type, and namespace, including its types, terms, and sub-namespaces.

scratch/main> move Foo Bar
scratch/main> ls
scratch/main> ls Bar
scratch/main> history Bar

Happy Path - Just term

bonk = 5
z/main> builtins.merge
z/main> add
z/main> move bonk zonk
z/main> ls

Happy Path - Just namespace

bonk.zonk = 5
a/main> builtins.merge
a/main> add
a/main> move bonk zonk
a/main> ls
a/main> view zonk.zonk

Sad Path - No term, type, or namespace named src

scratch/main> move doesntexist foo