mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Remove a git attribute for linguist.
This commit is contained in:
parent
d47b5f8c6a
commit
5f51476526
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,2 +0,0 @@
|
|||||||
# Use an approximate language for syntax highlighting (clojure is pretty close)
|
|
||||||
*.janet linguist-language=clojure
|
|
@ -406,7 +406,7 @@ static void janet_pretty_one(struct pretty *S, Janet x, int is_dict_value) {
|
|||||||
if (S->depth == 0) {
|
if (S->depth == 0) {
|
||||||
janet_buffer_push_cstring(S->buffer, "...");
|
janet_buffer_push_cstring(S->buffer, "...");
|
||||||
} else {
|
} else {
|
||||||
if (!isarray && len >= JANET_PRETTY_IND_ONELINE)
|
if (!isarray && !(S->flags & JANET_PRETTY_ONELINE) && len >= JANET_PRETTY_IND_ONELINE)
|
||||||
janet_buffer_push_u8(S->buffer, ' ');
|
janet_buffer_push_u8(S->buffer, ' ');
|
||||||
if (is_dict_value && len >= JANET_PRETTY_IND_ONELINE) print_newline(S, 0);
|
if (is_dict_value && len >= JANET_PRETTY_IND_ONELINE) print_newline(S, 0);
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
|
@ -154,6 +154,7 @@
|
|||||||
(assert (= (((|||4))) 4) "function shorthand 7")
|
(assert (= (((|||4))) 4) "function shorthand 7")
|
||||||
(assert (= (|(+ $1 $1 $1 $1) 2 4) 16) "function shorthand 8")
|
(assert (= (|(+ $1 $1 $1 $1) 2 4) 16) "function shorthand 8")
|
||||||
(assert (= (|(+ $0 $1 $3 $2 $6) 0 1 2 3 4 5 6) 12) "function shorthand 9")
|
(assert (= (|(+ $0 $1 $3 $2 $6) 0 1 2 3 4 5 6) 12) "function shorthand 9")
|
||||||
|
(assert (= (|(+ $0 $99) ;(range 100)) 99) "function shorthand 10")
|
||||||
|
|
||||||
# Simple function break
|
# Simple function break
|
||||||
(debug/fbreak map 1)
|
(debug/fbreak map 1)
|
||||||
@ -163,4 +164,10 @@
|
|||||||
(debug/unfbreak map 1)
|
(debug/unfbreak map 1)
|
||||||
(map inc [1 2 3])
|
(map inc [1 2 3])
|
||||||
|
|
||||||
|
# Simple take, drop, etc. tests.
|
||||||
|
(assert (deep= (take 10 (range 100)) (range 10)) "take 10")
|
||||||
|
(assert (deep= (drop 10 (range 100)) (range 10 100)) "drop 10")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(end-suite)
|
(end-suite)
|
||||||
|
Loading…
Reference in New Issue
Block a user