Fixing eval unit test, and help lint failures from stricter help lint

db4
Slava Pestov 2009-01-27 15:38:01 -06:00
parent 7780c5d983
commit 298fdecf32
19 changed files with 29 additions and 29 deletions

View File

@ -1,4 +1,4 @@
IN: eval.tests IN: eval.tests
USING: eval tools.test ; USING: eval tools.test ;
[ "4\n" ] [ "USING: math prettyprint ; 2 2 + ." eval>string ] unit-testv [ "4\n" ] [ "USING: math prettyprint ; 2 2 + ." eval>string ] unit-test

View File

@ -7,7 +7,7 @@ HELP: printf
{ $values { "format-string" string } } { $values { "format-string" string } }
{ $description { $description
"Writes the arguments (specified on the stack) formatted according to the format string.\n" "Writes the arguments (specified on the stack) formatted according to the format string.\n"
"\n" $nl
"Several format specifications exist for handling arguments of different types, and " "Several format specifications exist for handling arguments of different types, and "
"specifying attributes for the result string, including such things as maximum width, " "specifying attributes for the result string, including such things as maximum width, "
"padding, and decimals.\n" "padding, and decimals.\n"
@ -24,10 +24,10 @@ HELP: printf
{ "%+Px" "Hexadecimal" "hex" } { "%+Px" "Hexadecimal" "hex" }
{ "%+PX" "Hexadecimal uppercase" "hex" } { "%+PX" "Hexadecimal uppercase" "hex" }
} }
"\n" $nl
"A plus sign ('+') is used to optionally specify that the number should be " "A plus sign ('+') is used to optionally specify that the number should be "
"formatted with a '+' preceeding it if positive.\n" "formatted with a '+' preceeding it if positive.\n"
"\n" $nl
"Padding ('P') is used to optionally specify the minimum width of the result " "Padding ('P') is used to optionally specify the minimum width of the result "
"string, the padding character, and the alignment. By default, the padding " "string, the padding character, and the alignment. By default, the padding "
"character defaults to a space and the alignment defaults to right-aligned. " "character defaults to a space and the alignment defaults to right-aligned. "
@ -38,7 +38,7 @@ HELP: printf
"\"%'#5f\" formats a float padding with '#' up to 3 characters wide." "\"%'#5f\" formats a float padding with '#' up to 3 characters wide."
"\"%-10d\" formats an integer to 10 characters wide and left-aligns." "\"%-10d\" formats an integer to 10 characters wide and left-aligns."
} }
"\n" $nl
"Digits ('D') is used to optionally specify the maximum digits in the result " "Digits ('D') is used to optionally specify the maximum digits in the result "
"string. For example:\n" "string. For example:\n"
{ $list { $list
@ -83,7 +83,7 @@ HELP: strftime
{ $values { "format-string" string } } { $values { "format-string" string } }
{ $description { $description
"Writes the timestamp (specified on the stack) formatted according to the format string.\n" "Writes the timestamp (specified on the stack) formatted according to the format string.\n"
"\n" $nl
"Different attributes of the timestamp can be retrieved using format specifications.\n" "Different attributes of the timestamp can be retrieved using format specifications.\n"
{ $table { $table
{ "%a" "Abbreviated weekday name." } { "%a" "Abbreviated weekday name." }
@ -118,7 +118,7 @@ HELP: strftime
} ; } ;
ARTICLE: "formatting" "Formatted printing" ARTICLE: "formatting" "Formatted printing"
"The " { $vocab-link "formatting" } " vocabulary is used for formatted printing.\n" "The " { $vocab-link "formatting" } " vocabulary is used for formatted printing."
{ $subsection printf } { $subsection printf }
{ $subsection sprintf } { $subsection sprintf }
{ $subsection strftime } { $subsection strftime }

View File

@ -29,7 +29,7 @@ HELP: feed-entry-date
HELP: feed-entry-description HELP: feed-entry-description
{ $values { $values
{ "object" object } { "object" object }
{ "description" null } { "description" string }
} }
{ $contract "Outputs a feed entry description." } ; { $contract "Outputs a feed entry description." } ;

View File

@ -18,7 +18,8 @@ HELP: <interval-map>
{ $description "From a specification, produce an interval tree. The specification is an assoc where the keys are intervals, or pairs of numbers to represent intervals, or individual numbers to represent singleton intervals. The values are the values int he interval map. Construction time is O(n log n)." } ; { $description "From a specification, produce an interval tree. The specification is an assoc where the keys are intervals, or pairs of numbers to represent intervals, or individual numbers to represent singleton intervals. The values are the values int he interval map. Construction time is O(n log n)." } ;
ARTICLE: "interval-maps" "Interval maps" ARTICLE: "interval-maps" "Interval maps"
"Interval maps are a mechanism, similar to assocs, where a set of closed intervals of keys are associated with values. As such, interval maps do not conform to the assoc protocol, because intervals of floats, for example, can be used, and it is impossible to get a list of keys in between." "The " { $vocab-link "interval-maps" } " vocabulary implements a data structure, similar to assocs, where a set of closed intervals of keys are associated with values. As such, interval maps do not conform to the assoc protocol, because intervals of floats, for example, can be used, and it is impossible to get a list of keys in between."
$nl
"The following operations are used to query interval maps:" "The following operations are used to query interval maps:"
{ $subsection interval-at* } { $subsection interval-at* }
{ $subsection interval-at } { $subsection interval-at }

View File

@ -4,7 +4,7 @@ USING: help.syntax help.markup io.encodings.8-bit.private
strings ; strings ;
IN: io.encodings.8-bit IN: io.encodings.8-bit
ARTICLE: "io.encodings.8-bit" "8-bit encodings" ARTICLE: "io.encodings.8-bit" "Legacy 8-bit encodings"
"Many encodings are a simple mapping of bytes onto characters. The " { $vocab-link "io.encodings.8-bit" } " vocabulary implements these generically using existing resource files. These encodings should be used with extreme caution, as fully general Unicode encodings like UTF-8 are nearly always more appropriate. The following 8-bit encodings are already defined:" "Many encodings are a simple mapping of bytes onto characters. The " { $vocab-link "io.encodings.8-bit" } " vocabulary implements these generically using existing resource files. These encodings should be used with extreme caution, as fully general Unicode encodings like UTF-8 are nearly always more appropriate. The following 8-bit encodings are already defined:"
{ $subsection latin1 } { $subsection latin1 }
{ $subsection latin2 } { $subsection latin2 }

View File

@ -55,7 +55,7 @@ HELP: human-sort-values
{ <=> >=< human-compare human-sort human-sort-keys human-sort-values } related-words { <=> >=< human-compare human-sort human-sort-keys human-sort-values } related-words
ARTICLE: "sorting.human" "sorting.human" ARTICLE: "sorting.human" "Human-friendly sorting"
"The " { $vocab-link "sorting.human" } " vocabulary sorts by numbers as a human would -- by comparing their magnitudes -- rather than in a lexicographic way. For example, sorting a1, a10, a03, a2 with human sort returns a1, a2, a03, a10, while sorting with natural sort returns a03, a1, a10, a2." $nl "The " { $vocab-link "sorting.human" } " vocabulary sorts by numbers as a human would -- by comparing their magnitudes -- rather than in a lexicographic way. For example, sorting a1, a10, a03, a2 with human sort returns a1, a2, a03, a10, while sorting with natural sort returns a03, a1, a10, a2." $nl
"Comparing two objects:" "Comparing two objects:"
{ $subsection human<=> } { $subsection human<=> }

View File

@ -185,7 +185,9 @@ $nl
{ $subsection add-gadgets } { $subsection add-gadgets }
{ $subsection clear-gadget } { $subsection clear-gadget }
"The children of a gadget are available via the " "The children of a gadget are available via the "
{ $snippet "children" } " slot. " "Working with gadget children:" { $snippet "children" } " slot. "
$nl
"Working with gadget children:"
{ $subsection gadget-child } { $subsection gadget-child }
{ $subsection nth-gadget } { $subsection nth-gadget }
{ $subsection each-child } { $subsection each-child }

View File

@ -83,7 +83,6 @@ ARTICLE: "unix.groups" "Unix groups"
$nl $nl
"Listing all groups:" "Listing all groups:"
{ $subsection all-groups } { $subsection all-groups }
"Returning a passwd tuple:"
"Real groups:" "Real groups:"
{ $subsection real-group-name } { $subsection real-group-name }
{ $subsection real-group-id } { $subsection real-group-id }

View File

@ -91,7 +91,6 @@ ARTICLE: "unix.users" "Unix users"
$nl $nl
"Listing all users:" "Listing all users:"
{ $subsection all-users } { $subsection all-users }
"Returning a passwd tuple:"
"Real user:" "Real user:"
{ $subsection real-user-name } { $subsection real-user-name }
{ $subsection real-user-id } { $subsection real-user-id }

View File

@ -1,6 +1,6 @@
USING: help.markup help.syntax kernel kernel.private USING: help.markup help.syntax kernel kernel.private
continuations.private vectors arrays namespaces continuations.private vectors arrays namespaces
assocs words quotations lexer sequences ; assocs words quotations lexer sequences math ;
IN: continuations IN: continuations
ARTICLE: "errors-restartable" "Restartable errors" ARTICLE: "errors-restartable" "Restartable errors"
@ -241,7 +241,7 @@ HELP: attempt-all
HELP: retry HELP: retry
{ $values { $values
{ "quot" quotation } { "n" null } { "quot" quotation } { "n" integer }
} }
{ $description "Tries the quotation up to " { $snippet "n" } " times until it returns true. Retries the quotation if an exception is thrown or if the quotation returns " { $link f } ". The quotation is expected to have side effects that may fail, such as generating a random name for a new file until successful." } { $description "Tries the quotation up to " { $snippet "n" } " times until it returns true. Retries the quotation if an exception is thrown or if the quotation returns " { $link f } ". The quotation is expected to have side effects that may fail, such as generating a random name for a new file until successful." }
{ $examples { $examples

View File

@ -84,10 +84,9 @@ $nl
{ $subsection initial-value } ; { $subsection initial-value } ;
ARTICLE: "slots" "Slots" ARTICLE: "slots" "Slots"
"A " { $emphasis "slot" } " is a component of an object which can store a value." "The " { $vocab-link "slots" } " vocabulary contains words for introspecting the slots of an object. A " { $emphasis "slot" } " is a component of an object which can store a value."
$nl $nl
{ $link "tuples" } " are composed entirely of slots, and instances of " { $link "builtin-classes" } " consist of slots together with intrinsic data." { $link "tuples" } " are composed entirely of slots, and instances of " { $link "builtin-classes" } " consist of slots together with intrinsic data."
"The " { $vocab-link "slots" } " vocabulary contains words for introspecting the slots of an object."
$nl $nl
"The " { $snippet "\"slots\"" } " word property of built-in and tuple classes holds an array of " { $emphasis "slot specifiers" } " describing the slot layout of each instance." "The " { $snippet "\"slots\"" } " word property of built-in and tuple classes holds an array of " { $emphasis "slot specifiers" } " describing the slot layout of each instance."
{ $subsection slot-spec } { $subsection slot-spec }

View File

@ -12,9 +12,9 @@ HELP: bshift
{ $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ; { $notes "It is important to note that even if the quotation discards items on the stack, the stack will be restored to the way it was before it is called (which is true of continuation usage in general)." } ;
ARTICLE: "partial-continuations" "Partial continuations" ARTICLE: "partial-continuations" "Partial continuations"
"Based on Scheme code for bshift and breset from" "Based on Scheme code for bshift and breset from "
{ $url "http://groups.google.com/group/comp.lang.scheme/msg/9f0d61da01540816" } "." { $url "http://groups.google.com/group/comp.lang.scheme/msg/9f0d61da01540816" } "."
"See this blog entry for more details:" " See this blog entry for more details:"
{ $url "http://www.bluishcoder.co.nz/2006/03/factor-partial-continuation-updates.html" } { $url "http://www.bluishcoder.co.nz/2006/03/factor-partial-continuation-updates.html" }
{ $subsection breset } { $subsection breset }
{ $subsection bshift } ; { $subsection bshift } ;

View File

@ -57,7 +57,7 @@ IN: scratchpad
{ n-based-assoc <n-based-assoc> } related-words { n-based-assoc <n-based-assoc> } related-words
ARTICLE: "sequences.n-based" "sequences.n-based" ARTICLE: "sequences.n-based" "N-based sequences"
"The " { $vocab-link "sequences.n-based" } " vocabulary provides a sequence adaptor that allows a sequence to be treated as an assoc with non-zero-based keys." "The " { $vocab-link "sequences.n-based" } " vocabulary provides a sequence adaptor that allows a sequence to be treated as an assoc with non-zero-based keys."
{ $subsection n-based-assoc } { $subsection n-based-assoc }
{ $subsection <n-based-assoc> } { $subsection <n-based-assoc> }