Skip to content

Commit 8939f45

Browse files
committed
Turn abs example back into an mdtest
1 parent affe782 commit 8939f45

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/language/functions/abs.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ must be a numeric type.
1515

1616
### Examples
1717

18-
{{< super-playground "yield abs(this)" >}}
18+
Absolute value of a various numbers:
19+
```mdtest-command
20+
echo '1 -1 0 -1.0 -1(int8) 1(uint8) "foo"' | super -z -c 'yield abs(this)' -
21+
```
22+
23+
```mdtest-output
24+
1
1925
1
20-
-1
2126
0
22-
-1.0
23-
-1(int8)
27+
1.
28+
1(int8)
2429
1(uint8)
25-
"foo"
26-
{{</ super-playground >}}
30+
error({message:"abs: not a number",on:"foo"})
31+
```

0 commit comments

Comments
 (0)