aboutsummaryrefslogtreecommitdiff
path: root/test.uwu
blob: 8e7d32b52455ddce7ee3afb5697b93f9c3916320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
main flow:linear(
	io:print("please enter something:"),
	io:print(io:scan),

	io:print(:str:cat(
		"your input: ",
		io:scan("please enter something else: ")
	)),

	io:print(:nil:nil),
	io:print("--- QUINE ---"),
	io:print(fs:read("test.uwu")),
	io:print("--- END OF QUINE ---"),
	io:print(:nil:nil),

	fs:write("test", "hello world"),
	:bool:if(fs:exists("test"),
		io:print("successfully wrote file"),
		flow:error("failed to write file")
	),

	io:print(fs:read("test")),

	fs:remove("test"),
	:bool:if(fs:exists("test"),
		flow:error("failed to remove file"),
		io:print("successfully removed file")
	),

	io:print(os:time),
	os:sleep(500),
	io:print(os:time),

	os:execute("echo hello world"),

	"success"
)