mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
Merge branch 'master' into read-from-tail
This commit is contained in:
@@ -312,6 +312,41 @@ fn squeeze_limit_line_numbers() {
|
||||
.stdout(" 1 line 1\n 2 \n 3 \n 4 \n 5 line 5\n 6 \n 7 \n 8 \n 9 \n 10 \n 20 line 20\n 21 line 21\n 22 \n 23 \n 24 line 24\n 25 \n 26 line 26\n 27 \n 28 \n 29 \n 30 line 30\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_themes_with_colors() {
|
||||
#[cfg(target_os = "macos")]
|
||||
let default_theme_chunk = "Monokai Extended Light\x1B[0m (default)";
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let default_theme_chunk = "Monokai Extended\x1B[0m (default)";
|
||||
|
||||
bat()
|
||||
.arg("--color=always")
|
||||
.arg("--list-themes")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(predicate::str::contains("DarkNeon").normalize())
|
||||
.stdout(predicate::str::contains(default_theme_chunk).normalize())
|
||||
.stdout(predicate::str::contains("Output the square of a number.").normalize());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_themes_without_colors() {
|
||||
#[cfg(target_os = "macos")]
|
||||
let default_theme_chunk = "Monokai Extended Light (default)";
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let default_theme_chunk = "Monokai Extended (default)";
|
||||
|
||||
bat()
|
||||
.arg("--color=never")
|
||||
.arg("--list-themes")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(predicate::str::contains("DarkNeon").normalize())
|
||||
.stdout(predicate::str::contains(default_theme_chunk).normalize());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(any(not(feature = "git"), target_os = "windows"), ignore)]
|
||||
fn short_help() {
|
||||
@@ -2671,3 +2706,215 @@ fn highlighting_independant_from_map_syntax_case() {
|
||||
.stdout(expected)
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_always_strips_ansi() {
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=always")
|
||||
.write_stdin("\x1B[33mYellow\x1B[m")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout("Yellow");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_never_does_not_strip_ansi() {
|
||||
let output = String::from_utf8(
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=never")
|
||||
.write_stdin("\x1B[33mYellow\x1B[m")
|
||||
.assert()
|
||||
.success()
|
||||
.get_output()
|
||||
.stdout
|
||||
.clone(),
|
||||
)
|
||||
.expect("valid utf8");
|
||||
|
||||
assert!(output.contains("\x1B[33mYellow"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_does_not_affect_simple_printer() {
|
||||
let output = String::from_utf8(
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=never")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=always")
|
||||
.write_stdin("\x1B[33mYellow\x1B[m")
|
||||
.assert()
|
||||
.success()
|
||||
.get_output()
|
||||
.stdout
|
||||
.clone(),
|
||||
)
|
||||
.expect("valid utf8");
|
||||
|
||||
assert!(output.contains("\x1B[33mYellow"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_does_not_strip_when_show_nonprintable() {
|
||||
let output = String::from_utf8(
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=never")
|
||||
.arg("--color=always")
|
||||
.arg("--strip-ansi=always")
|
||||
.arg("--show-nonprintable")
|
||||
.write_stdin("\x1B[33mY")
|
||||
.assert()
|
||||
.success()
|
||||
.get_output()
|
||||
.stdout
|
||||
.clone(),
|
||||
)
|
||||
.expect("valid utf8");
|
||||
|
||||
assert!(output.contains("␛"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_auto_strips_ansi_when_detected_syntax_by_filename() {
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=auto")
|
||||
.arg("--file-name=test.rs")
|
||||
.write_stdin("fn \x1B[33mYellow\x1B[m() -> () {}")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout("fn Yellow() -> () {}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_auto_strips_ansi_when_provided_syntax_by_option() {
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=auto")
|
||||
.arg("--language=rust")
|
||||
.write_stdin("fn \x1B[33mYellow\x1B[m() -> () {}")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout("fn Yellow() -> () {}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_auto_does_not_strip_when_plain_text_by_filename() {
|
||||
let output = String::from_utf8(
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=auto")
|
||||
.arg("--file-name=ansi.txt")
|
||||
.write_stdin("\x1B[33mYellow\x1B[m")
|
||||
.assert()
|
||||
.success()
|
||||
.get_output()
|
||||
.stdout
|
||||
.clone(),
|
||||
)
|
||||
.expect("valid utf8");
|
||||
|
||||
assert!(output.contains("\x1B[33mYellow"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strip_ansi_auto_does_not_strip_ansi_when_plain_text_by_option() {
|
||||
let output = String::from_utf8(
|
||||
bat()
|
||||
.arg("--style=plain")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.arg("--strip-ansi=auto")
|
||||
.arg("--language=txt")
|
||||
.write_stdin("\x1B[33mYellow\x1B[m")
|
||||
.assert()
|
||||
.success()
|
||||
.get_output()
|
||||
.stdout
|
||||
.clone(),
|
||||
)
|
||||
.expect("valid utf8");
|
||||
|
||||
assert!(output.contains("\x1B[33mYellow"))
|
||||
}
|
||||
|
||||
// Tests that style components can be removed with `-component`.
|
||||
#[test]
|
||||
fn style_components_can_be_removed() {
|
||||
bat()
|
||||
.arg({
|
||||
#[cfg(not(feature = "git"))]
|
||||
{
|
||||
"--style=full,-grid"
|
||||
}
|
||||
#[cfg(feature = "git")]
|
||||
{
|
||||
"--style=full,-grid,-changes"
|
||||
}
|
||||
})
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.write_stdin("test")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(" STDIN\n Size: -\n 1 test\n")
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
// Tests that style components are chosen based on the rightmost `--style` argument.
|
||||
#[test]
|
||||
fn style_components_can_be_overidden() {
|
||||
bat()
|
||||
.arg("--style=full")
|
||||
.arg("--style=header,numbers")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.write_stdin("test")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(" STDIN\n 1 test\n")
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
// Tests that style components can be merged across multiple `--style` arguments.
|
||||
#[test]
|
||||
fn style_components_will_merge() {
|
||||
bat()
|
||||
.arg("--style=header,grid")
|
||||
.arg("--style=-grid,+numbers")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.write_stdin("test")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(" STDIN\n 1 test\n")
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
// Tests that style components can be merged with the `BAT_STYLE` environment variable.
|
||||
#[test]
|
||||
fn style_components_will_merge_with_env_var() {
|
||||
bat()
|
||||
.env("BAT_STYLE", "header,grid")
|
||||
.arg("--style=-grid,+numbers")
|
||||
.arg("--decorations=always")
|
||||
.arg("--color=never")
|
||||
.write_stdin("test")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(" STDIN\n 1 test\n")
|
||||
.stderr("");
|
||||
}
|
||||
|
54
tests/syntax-tests/highlighted/CFML/test.cfml
vendored
Normal file
54
tests/syntax-tests/highlighted/CFML/test.cfml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mhead[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mtitle[0m[38;2;255;255;255m>[0m[38;2;248;248;242mAdd New Employees[0m[38;2;255;255;255m</[0m[38;2;249;38;114mtitle[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mhead[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mbody[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mh1[0m[38;2;255;255;255m>[0m[38;2;248;248;242mAdd New Employees[0m[38;2;255;255;255m</[0m[38;2;249;38;114mh1[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;117;113;94m<!---[0m[38;2;117;113;94m Action page code for the form at the bottom of this page. [0m[38;2;117;113;94m--->[0m[38;2;248;248;242m [0m
|
||||
[38;2;117;113;94m<!---[0m[38;2;117;113;94m Establish parameters for first time through [0m[38;2;117;113;94m--->[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfparam[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116mForm.firstname[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mdefault[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfparam[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116mForm.lastname[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mdefault[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfparam[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116mForm.email[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mdefault[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfparam[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116mForm.phone[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mdefault[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfparam[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116mForm.department[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mdefault[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;117;113;94m<!---[0m[38;2;117;113;94m If at least the firstname form field is passed, create [0m
|
||||
[38;2;117;113;94ma structure named employee and add values. [0m[38;2;117;113;94m--->[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfif[0m[38;2;248;248;242m [0m[38;2;248;248;242m#[0m[38;2;255;255;255mForm[0m[38;2;248;248;242m.[0m[38;2;248;248;242mfirstname[0m[38;2;248;248;242m#[0m[38;2;248;248;242m [0m[38;2;255;255;255meq[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mp[0m[38;2;255;255;255m>[0m[38;2;248;248;242mPlease fill out the form.[0m[38;2;255;255;255m</[0m[38;2;249;38;114mp[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfelse[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfoutput[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcfscript[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255memployee[0m[38;2;249;38;114m=[0m[38;2;102;217;239mStructNew[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255memployee[0m[38;2;248;248;242m.[0m[38;2;248;248;242mfirstname[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255mForm[0m[38;2;248;248;242m.[0m[38;2;248;248;242mfirstname[0m[38;2;248;248;242m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255memployee[0m[38;2;248;248;242m.[0m[38;2;248;248;242mlastname[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255mForm[0m[38;2;248;248;242m.[0m[38;2;248;248;242mlastname[0m[38;2;248;248;242m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255memployee[0m[38;2;248;248;242m.[0m[38;2;248;248;242memail[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255mForm[0m[38;2;248;248;242m.[0m[38;2;248;248;242memail[0m[38;2;248;248;242m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255memployee[0m[38;2;248;248;242m.[0m[38;2;248;248;242mphone[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255mForm[0m[38;2;248;248;242m.[0m[38;2;248;248;242mphone[0m[38;2;248;248;242m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255memployee[0m[38;2;248;248;242m.[0m[38;2;248;248;242mdepartment[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255mForm[0m[38;2;248;248;242m.[0m[38;2;248;248;242mdepartment[0m[38;2;248;248;242m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mcfscript[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;117;113;94m<!---[0m[38;2;117;113;94m Display results of creating the structure. [0m[38;2;117;113;94m--->[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mFirst name is [0m[38;2;248;248;242m#[0m[38;2;102;217;239mStructFind[0m[38;2;248;248;242m([0m[38;2;255;255;255memployee[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mfirstname[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m#[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mLast name is [0m[38;2;248;248;242m#[0m[38;2;102;217;239mStructFind[0m[38;2;248;248;242m([0m[38;2;255;255;255memployee[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mlastname[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m#[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mEMail is [0m[38;2;248;248;242m#[0m[38;2;102;217;239mStructFind[0m[38;2;248;248;242m([0m[38;2;255;255;255memployee[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116memail[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m#[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mPhone is [0m[38;2;248;248;242m#[0m[38;2;102;217;239mStructFind[0m[38;2;248;248;242m([0m[38;2;255;255;255memployee[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mphone[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m#[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mDepartment is [0m[38;2;248;248;242m#[0m[38;2;102;217;239mStructFind[0m[38;2;248;248;242m([0m[38;2;255;255;255memployee[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mdepartment[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m#[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mcfoutput[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;117;113;94m<!---[0m[38;2;117;113;94m Call the custom tag that adds employees. [0m[38;2;117;113;94m--->[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mcf_addemployee[0m[38;2;248;248;242m [0m[38;2;166;226;46mempinfo[0m[38;2;248;248;242m=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m#[0m[38;2;255;255;255memployee[0m[38;2;230;219;116m#[0m[38;2;230;219;116m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mcfif[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;117;113;94m<!---[0m[38;2;117;113;94m The form for adding the new employee information [0m[38;2;117;113;94m--->[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mhr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mform[0m[38;2;248;248;242m [0m[38;2;166;226;46maction[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mnewemployee.cfm[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mmethod[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mPost[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mFirst Name:[0m[38;2;190;132;255m&[0m[38;2;190;132;255mnbsp[0m[38;2;190;132;255m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114minput[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mfirstname[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mtype[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mtext[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mhspace[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mmaxlength[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mLast Name:[0m[38;2;190;132;255m&[0m[38;2;190;132;255mnbsp[0m[38;2;190;132;255m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114minput[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mlastname[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mtype[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mtext[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mhspace[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mmaxlength[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mEMail:[0m[38;2;190;132;255m&[0m[38;2;190;132;255mnbsp[0m[38;2;190;132;255m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114minput[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116memail[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mtype[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mtext[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mhspace[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mmaxlength[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mPhone:[0m[38;2;190;132;255m&[0m[38;2;190;132;255mnbsp[0m[38;2;190;132;255m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114minput[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mphone[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mtype[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mtext[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mhspace[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m20[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mmaxlength[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m20[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mDepartment:[0m[38;2;190;132;255m&[0m[38;2;190;132;255mnbsp[0m[38;2;190;132;255m;[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114minput[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mdepartment[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mtype[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mtext[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mhspace[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mmaxlength[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116m30[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114minput[0m[38;2;248;248;242m [0m[38;2;166;226;46mtype[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mSubmit[0m[38;2;255;255;255m"[0m[38;2;248;248;242m [0m[38;2;166;226;46mvalue[0m[38;2;166;226;46m=[0m[38;2;255;255;255m"[0m[38;2;230;219;116mOK[0m[38;2;255;255;255m"[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mform[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m<[0m[38;2;249;38;114mbr[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mbody[0m[38;2;255;255;255m>[0m[38;2;248;248;242m [0m
|
||||
[38;2;255;255;255m</[0m[38;2;249;38;114mhtml[0m[38;2;255;255;255m>[0m
|
126
tests/syntax-tests/highlighted/Lisp/utils.lisp
vendored
126
tests/syntax-tests/highlighted/Lisp/utils.lisp
vendored
@@ -1,80 +1,80 @@
|
||||
[38;2;255;255;255m([0m[38;2;248;248;242mcl:[0m[38;2;102;217;239mdefpackage[0m[38;2;248;248;242m :chillax.utils[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242m:use :cl :alexandria[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242m:[0m[38;2;102;217;239mexport[0m
|
||||
[38;2;248;248;242m :fun :mkhash :hashget :strcat :dequote :at[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;255;255;255m([0m[38;2;102;217;239min-package[0m[38;2;248;248;242m :chillax.utils[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;248;248;242mcl[0m[38;2;248;248;242m:[0m[38;2;249;38;114mdefpackage[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mchillax.utils[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;249;38;114muse[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mcl[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114malexandria[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m:[0m[38;2;249;38;114mexport[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mmkhash[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mhashget[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mstrcat[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mdequote[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mat[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;102;217;239min-package[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mchillax.utils[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m;; Functions[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefmacro[0m[38;2;248;248;242m [0m[38;2;166;226;46mfun[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242m&body body[0m[38;2;255;255;255m)[0m
|
||||
[38;2;117;113;94m;;;[0m[38;2;117;113;94m Functions[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefmacro[0m[38;2;248;248;242m [0m[38;2;166;226;46mfun[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m&[0m[38;2;248;248;242mbody[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mbody[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mThis macro puts the FUN back in FUNCTION.[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m `[0m[38;2;255;255;255m([0m[38;2;102;217;239mlambda[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242m&optional _[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mdeclare [0m[38;2;255;255;255m([0m[38;2;248;248;242mignorable _[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;248;248;242m ,@body[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m`[0m[38;2;248;248;242m([0m[38;2;249;38;114mlambda[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m&[0m[38;2;248;248;242moptional[0m[38;2;248;248;242m [0m[3;38;2;253;151;31m_[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mdeclare[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mignorable[0m[38;2;248;248;242m [0m[38;2;255;255;255m_[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m,@[0m[38;2;255;255;255mbody[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m;; Hash tables[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mmkhash[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242m&[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;249;38;114m-[0m[38;2;249;38;114mand[0m[38;2;249;38;114m-[0m[38;2;102;217;239mvalues[0m[38;2;248;248;242m &aux [0m[38;2;255;255;255m([0m[38;2;248;248;242mtable [0m[38;2;255;255;255m([0m[38;2;102;217;239mmake-hash-table[0m[38;2;248;248;242m :test [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'equal[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;117;113;94m;;;[0m[38;2;117;113;94m Hash tables[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mmkhash[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkeys-and-values[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242maux[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mtable[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mmake-hash-table[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mtest[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;249;38;114mequal[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mConvenience function for `literal' hash table definition.[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mloop[0m[38;2;248;248;242m [0m[38;2;249;38;114mfor[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mkey val[0m[38;2;255;255;255m)[0m[38;2;248;248;242m on keys[0m[38;2;249;38;114m-[0m[38;2;249;38;114mand[0m[38;2;249;38;114m-[0m[38;2;102;217;239mvalues[0m[38;2;248;248;242m by [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'cddr[0m[38;2;248;248;242m [0m[38;2;249;38;114mdo[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m key table[0m[38;2;255;255;255m)[0m[38;2;248;248;242m val[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mfinally[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mreturn[0m[38;2;248;248;242m table[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mloop[0m[38;2;248;248;242m [0m[38;2;249;38;114mfor[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255mval[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114mon[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys-and-values[0m[38;2;248;248;242m [0m[38;2;249;38;114mby[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;102;217;239mcddr[0m[38;2;248;248;242m [0m[38;2;249;38;114mdo[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255mtable[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mval[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mfinally[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mreturn[0m[38;2;248;248;242m [0m[38;2;255;255;255mtable[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mhashget[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mhash &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mhashget[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mhash[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkeys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mConvenience function for recursively accessing hash tables.[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mreduce[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mlambda[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mh k[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m k h[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;248;248;242m keys :initial[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue hash[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mreduce[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mlambda[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mh[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mk[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m [0m[38;2;255;255;255mk[0m[38;2;248;248;242m [0m[38;2;255;255;255mh[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114minitial-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mhash[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;255;255;255m([0m[38;2;102;217;239mdefine-compiler-macro[0m[38;2;248;248;242m hashget [0m[38;2;255;255;255m([0m[38;2;248;248;242mhash &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;190;132;255mnull[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m[38;2;248;248;242m hash[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mlet[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;255;255;255m([0m[38;2;248;248;242mhash[0m[38;2;249;38;114m-[0m[38;2;248;248;242msym [0m[38;2;255;255;255m([0m[38;2;102;217;239mmake-symbol[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mHASH[0m[38;2;230;219;116m"[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mkey[0m[38;2;249;38;114m-[0m[38;2;248;248;242msyms [0m[38;2;255;255;255m([0m[38;2;249;38;114mloop[0m[38;2;248;248;242m [0m[38;2;249;38;114mfor[0m[38;2;248;248;242m i below [0m[38;2;255;255;255m([0m[38;2;102;217;239mlength[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;102;217;239mcollect[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mmake-symbol[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mformat[0m[38;2;248;248;242m [0m[38;2;190;132;255mnil[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m~:@(~:R~)-KEY[0m[38;2;230;219;116m"[0m[38;2;248;248;242m i[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m `[0m[38;2;255;255;255m([0m[38;2;249;38;114mlet[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;255;255;255m([0m[38;2;248;248;242m,hash[0m[38;2;249;38;114m-[0m[38;2;248;248;242msym ,hash[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m ,@[0m[38;2;255;255;255m([0m[38;2;249;38;114mloop[0m[38;2;248;248;242m [0m[38;2;249;38;114mfor[0m[38;2;248;248;242m key in keys [0m[38;2;249;38;114mfor[0m[38;2;248;248;242m sym in key[0m[38;2;249;38;114m-[0m[38;2;248;248;242msyms[0m
|
||||
[38;2;248;248;242m [0m[38;2;102;217;239mcollect[0m[38;2;248;248;242m `[0m[38;2;255;255;255m([0m[38;2;248;248;242m,sym ,key[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m ,[0m[38;2;255;255;255m([0m[38;2;102;217;239mreduce[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mlambda[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mhash key[0m[38;2;255;255;255m)[0m[38;2;248;248;242m `[0m[38;2;255;255;255m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m ,key ,hash[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m key[0m[38;2;249;38;114m-[0m[38;2;248;248;242msyms :initial[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue hash[0m[38;2;249;38;114m-[0m[38;2;248;248;242msym[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefine-compiler-macro[0m[38;2;248;248;242m [0m[38;2;255;255;255mhashget[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mhash[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;190;132;255mnull[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mhash[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mlet[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m([0m[38;2;255;255;255mhash-sym[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mmake-symbol[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mHASH[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;255;255;255mkey-syms[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mloop[0m[38;2;248;248;242m [0m[38;2;249;38;114mfor[0m[38;2;248;248;242m [0m[38;2;255;255;255mi[0m[38;2;248;248;242m [0m[38;2;249;38;114mbelow[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mlength[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;102;217;239mcollect[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mmake-symbol[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mformat[0m[38;2;248;248;242m [0m[38;2;190;132;255mnil[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m~:@([0m[38;2;190;132;255m~[0m[38;2;190;132;255m:R[0m[38;2;230;219;116m~)-KEY[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;255;255;255mi[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m`[0m[38;2;248;248;242m([0m[38;2;249;38;114mlet[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m([0m[38;2;255;255;255m,[0m[38;2;255;255;255mhash-sym[0m[38;2;248;248;242m [0m[38;2;255;255;255m,[0m[38;2;255;255;255mhash[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m ,[0m[38;2;255;255;255m@[0m[38;2;248;248;242m([0m[38;2;255;255;255mloop[0m[38;2;248;248;242m [0m[38;2;255;255;255mfor[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255min[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m [0m[38;2;255;255;255mfor[0m[38;2;248;248;242m [0m[38;2;255;255;255msym[0m[38;2;248;248;242m [0m[38;2;255;255;255min[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey-syms[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mcollect[0m[38;2;248;248;242m [0m[38;2;248;248;242m`[0m[38;2;248;248;242m([0m[38;2;255;255;255m,[0m[38;2;255;255;255msym[0m[38;2;248;248;242m [0m[38;2;255;255;255m,[0m[38;2;255;255;255mkey[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m,[0m[38;2;248;248;242m([0m[38;2;102;217;239mreduce[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mlambda[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mhash[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkey[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m`[0m[38;2;248;248;242m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m [0m[38;2;255;255;255m,[0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255m,[0m[38;2;255;255;255mhash[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mkey-syms[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114minitial-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mhash-sym[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m hashget[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mnew[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue hash key &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31msetf[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mhashget[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mnew-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mhash[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mUses the last key given to hashget to insert NEW-VALUE into the hash table[0m
|
||||
[38;2;230;219;116mreturned by the second-to-last key.[0m
|
||||
[38;2;230;219;116mtl;dr: DWIM SETF function for HASHGET.[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mcar[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mlast[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'hashget[0m[38;2;248;248;242m hash key [0m[38;2;255;255;255m([0m[38;2;102;217;239mbutlast[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m new[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m key hash[0m[38;2;255;255;255m)[0m[38;2;248;248;242m new[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mcar[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mlast[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;248;248;242mhashget[0m[38;2;248;248;242m [0m[38;2;255;255;255mhash[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mbutlast[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mnew-value[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mgethash[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255mhash[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mnew-value[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m;; Strings[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mstrcat[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mstring[0m[38;2;248;248;242m &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mstrings[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'concatenate[0m[38;2;248;248;242m '[0m[38;2;102;217;239mstring[0m[38;2;248;248;242m [0m[38;2;102;217;239mstring[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mstrings[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;117;113;94m;;;[0m[38;2;117;113;94m Strings[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mstrcat[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mstring[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mmore-strings[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;102;217;239mconcatenate[0m[38;2;248;248;242m [0m[38;2;248;248;242m'[0m[38;2;190;132;255mstring[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstring[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-strings[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mdequote[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mstring[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mlet[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;255;255;255m([0m[38;2;248;248;242mlen [0m[38;2;255;255;255m([0m[38;2;102;217;239mlength[0m[38;2;248;248;242m [0m[38;2;102;217;239mstring[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mand[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114m>[0m[38;2;248;248;242m len [0m[38;2;190;132;255m1[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mstarts[0m[38;2;249;38;114m-[0m[38;2;249;38;114mwith[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m\"[0m[38;2;248;248;242m [0m[38;2;102;217;239mstring[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mends[0m[38;2;249;38;114m-[0m[38;2;249;38;114mwith[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m\"[0m[38;2;248;248;242m [0m[38;2;102;217;239mstring[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msubseq[0m[38;2;248;248;242m [0m[38;2;102;217;239mstring[0m[38;2;248;248;242m [0m[38;2;190;132;255m1[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114m-[0m[38;2;248;248;242m len [0m[38;2;190;132;255m1[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;102;217;239mstring[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46mdequote[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mstring[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mlet[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m([0m[38;2;255;255;255mlen[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mlength[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstring[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mand[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114m>[0m[38;2;248;248;242m [0m[38;2;255;255;255mlen[0m[38;2;248;248;242m [0m[38;2;190;132;255m1[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mstarts-with[0m[38;2;248;248;242m [0m[38;2;190;132;255m#\[0m[38;2;190;132;255m"[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstring[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mends-with[0m[38;2;248;248;242m [0m[38;2;190;132;255m#\[0m[38;2;190;132;255m"[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstring[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239msubseq[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mstring[0m[38;2;248;248;242m [0m[38;2;190;132;255m1[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114m-[0m[38;2;248;248;242m [0m[38;2;255;255;255mlen[0m[38;2;248;248;242m [0m[38;2;190;132;255m1[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[3;38;2;102;217;239mstring[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m;;[0m
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m;; At[0m
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m;;[0m
|
||||
[38;2;255;255;255m([0m[38;2;102;217;239mdefgeneric[0m[38;2;248;248;242m at [0m[38;2;255;255;255m([0m[38;2;248;248;242mdoc &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;255;255;255m([0m[38;2;102;217;239mdefgeneric[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m at[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mnew[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue doc key &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;117;113;94m;;;[0m
|
||||
[38;2;117;113;94m;;;[0m[38;2;117;113;94m At[0m
|
||||
[38;2;117;113;94m;;;[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefgeneric[0m[38;2;248;248;242m [0m[38;2;166;226;46mat[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mdoc[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkeys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefgeneric[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31msetf[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mat[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mnew-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefmethod[0m[38;2;248;248;242m [0m[38;2;166;226;46mat[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;255;255;255m([0m[38;2;248;248;242mdoc hash[0m[38;2;249;38;114m-[0m[38;2;248;248;242mtable[0m[38;2;255;255;255m)[0m[38;2;248;248;242m &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'hashget[0m[38;2;248;248;242m doc keys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefmethod[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m at[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mnew[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue [0m[38;2;255;255;255m([0m[38;2;248;248;242mdoc hash[0m[38;2;249;38;114m-[0m[38;2;248;248;242mtable[0m[38;2;255;255;255m)[0m[38;2;248;248;242m key &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'[0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m hashget[0m[38;2;255;255;255m)[0m[38;2;248;248;242m new[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue doc key more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefmethod[0m[38;2;248;248;242m [0m[38;2;166;226;46mat[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m([0m[3;38;2;253;151;31mdoc[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mhash-table[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkeys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;248;248;242mhashget[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefmethod[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31msetf[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mat[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mnew-value[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mdoc[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mhash-table[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255mhashget[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mnew-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefmethod[0m[38;2;248;248;242m [0m[38;2;166;226;46mat[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;255;255;255m([0m[38;2;248;248;242mdoc [0m[38;2;102;217;239mlist[0m[38;2;255;255;255m)[0m[38;2;248;248;242m &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mreduce[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mlambda[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242malist key[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mcdr[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239massoc[0m[38;2;248;248;242m key alist :test [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'equal[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m keys :initial[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue doc[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefmethod[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m at[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mnew[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue [0m[38;2;255;255;255m([0m[38;2;248;248;242mdoc [0m[38;2;102;217;239mlist[0m[38;2;255;255;255m)[0m[38;2;248;248;242m key &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mcdr[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239massoc[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mcar[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mlast[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'at[0m[38;2;248;248;242m doc key [0m[38;2;255;255;255m([0m[38;2;102;217;239mbutlast[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m :test [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'equal[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m new[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mcdr[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239massoc[0m[38;2;248;248;242m key doc :test [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'equal[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;248;248;242m new[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefmethod[0m[38;2;248;248;242m [0m[38;2;166;226;46mat[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242m([0m[3;38;2;253;151;31mdoc[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mlist[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkeys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mreduce[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mlambda[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31malist[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkey[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mcdr[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239massoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255malist[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mtest[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;249;38;114mequal[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114minitial-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefmethod[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31msetf[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mat[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mnew-value[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mdoc[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mlist[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;249;38;114mif[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mcdr[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239massoc[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mcar[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mlast[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;248;248;242mat[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mbutlast[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mtest[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;249;38;114mequal[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mnew-value[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mcdr[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239massoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;249;38;114mtest[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;249;38;114mequal[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mnew-value[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m;[0m[38;2;117;113;94m; A playful alias.[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;248;248;242m@ [0m[38;2;255;255;255m([0m[38;2;248;248;242mdoc &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m keys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'at[0m[38;2;248;248;242m doc keys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;255;255;255m([0m[3;38;2;102;217;239mdefun[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m @[0m[38;2;255;255;255m)[0m[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;248;248;242mnew[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue doc key &[0m[38;2;102;217;239mrest[0m[38;2;248;248;242m more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;190;132;255m#[0m[38;2;190;132;255m'[0m[38;2;255;255;255m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m at[0m[38;2;255;255;255m)[0m[38;2;248;248;242m new[0m[38;2;249;38;114m-[0m[38;2;248;248;242mvalue doc key more[0m[38;2;249;38;114m-[0m[38;2;248;248;242mkeys[0m[38;2;255;255;255m)[0m[38;2;255;255;255m)[0m
|
||||
[38;2;117;113;94m;;[0m[38;2;117;113;94m A playful alias.[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;166;226;46m@[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31mdoc[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mkeys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;248;248;242mat[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkeys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m([0m[38;2;249;38;114mdefun[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[3;38;2;253;151;31msetf[0m[38;2;248;248;242m [0m[3;38;2;253;151;31m@[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;248;248;242mnew-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;248;248;242m&[0m[38;2;248;248;242mrest[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;102;217;239mapply[0m[38;2;248;248;242m [0m[38;2;248;248;242m#'[0m[38;2;248;248;242m([0m[38;2;102;217;239msetf[0m[38;2;248;248;242m [0m[38;2;255;255;255mat[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;255;255;255mnew-value[0m[38;2;248;248;242m [0m[38;2;255;255;255mdoc[0m[38;2;248;248;242m [0m[38;2;255;255;255mkey[0m[38;2;248;248;242m [0m[38;2;255;255;255mmore-keys[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
54
tests/syntax-tests/source/CFML/test.cfml
vendored
Normal file
54
tests/syntax-tests/source/CFML/test.cfml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<head>
|
||||
<title>Add New Employees</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Add New Employees</h1>
|
||||
<!--- Action page code for the form at the bottom of this page. --->
|
||||
<!--- Establish parameters for first time through --->
|
||||
<cfparam name="Form.firstname" default="">
|
||||
<cfparam name="Form.lastname" default="">
|
||||
<cfparam name="Form.email" default="">
|
||||
<cfparam name="Form.phone" default="">
|
||||
<cfparam name="Form.department" default="">
|
||||
<!--- If at least the firstname form field is passed, create
|
||||
a structure named employee and add values. --->
|
||||
<cfif #Form.firstname# eq "">
|
||||
<p>Please fill out the form.</p>
|
||||
<cfelse>
|
||||
<cfoutput>
|
||||
<cfscript>
|
||||
employee=StructNew();
|
||||
employee.firstname = Form.firstname;
|
||||
employee.lastname = Form.lastname;
|
||||
employee.email = Form.email;
|
||||
employee.phone = Form.phone;
|
||||
employee.department = Form.department;
|
||||
</cfscript>
|
||||
<!--- Display results of creating the structure. --->
|
||||
First name is #StructFind(employee, "firstname")#<br>
|
||||
Last name is #StructFind(employee, "lastname")#<br>
|
||||
EMail is #StructFind(employee, "email")#<br>
|
||||
Phone is #StructFind(employee, "phone")#<br>
|
||||
Department is #StructFind(employee, "department")#<br>
|
||||
</cfoutput>
|
||||
<!--- Call the custom tag that adds employees. --->
|
||||
<cf_addemployee empinfo="#employee#">
|
||||
</cfif>
|
||||
<!--- The form for adding the new employee information --->
|
||||
<hr>
|
||||
<form action="newemployee.cfm" method="Post">
|
||||
First Name:
|
||||
<input name="firstname" type="text" hspace="30" maxlength="30"><br>
|
||||
Last Name:
|
||||
<input name="lastname" type="text" hspace="30" maxlength="30"><br>
|
||||
EMail:
|
||||
<input name="email" type="text" hspace="30" maxlength="30"><br>
|
||||
Phone:
|
||||
<input name="phone" type="text" hspace="20" maxlength="20"><br>
|
||||
Department:
|
||||
<input name="department" type="text" hspace="30" maxlength="30"><br>
|
||||
<input type="Submit" value="OK">
|
||||
</form>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user