| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | USING: help.crossref help.topics help.markup tools.test words | 
					
						
							|  |  |  | definitions assocs sequences kernel namespaces parser arrays | 
					
						
							| 
									
										
										
										
											2009-10-23 04:27:45 -04:00
										 |  |  | io.streams.string continuations debugger compiler.units eval | 
					
						
							|  |  |  | help.syntax ;
 | 
					
						
							| 
									
										
										
										
											2009-08-13 20:21:44 -04:00
										 |  |  | IN: help.crossref.tests | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							| 
									
										
										
										
											2009-04-17 16:49:21 -04:00
										 |  |  |     "IN: help.crossref.tests USING: help.syntax help.markup ; : foo ( -- ) ; HELP: foo \"foo is great\" ; ARTICLE: \"foo\" \"Foo\" { $subsection foo } ;" eval( -- ) | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ $subsection ] [ | 
					
						
							|  |  |  |     "foo" article-content first first
 | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ t ] [ | 
					
						
							|  |  |  |     "foo" article-children | 
					
						
							| 
									
										
										
										
											2008-12-20 18:32:38 -05:00
										 |  |  |     "foo" "help.crossref.tests" lookup >link 1array sequence=
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-01 17:00:45 -05:00
										 |  |  | [ "foo" ] [ "foo" "help.crossref.tests" lookup article-parent ] unit-test | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-12-24 17:32:41 -05:00
										 |  |  | [ ] [ | 
					
						
							| 
									
										
										
										
											2008-03-01 17:00:45 -05:00
										 |  |  |     [ "foo" "help.crossref.tests" lookup forget ] with-compilation-unit | 
					
						
							| 
									
										
										
										
											2007-12-24 17:32:41 -05:00
										 |  |  | ] unit-test | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							| 
									
										
										
										
											2009-04-17 16:49:21 -04:00
										 |  |  |     "IN: help.crossref.tests USING: help.syntax help.markup ; : bar ( -- ) ; HELP: bar \"bar is great\" ; ARTICLE: \"bar\" \"Bar\" { $subsection bar } ;" eval( -- ) | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							|  |  |  |     "IN: ayy USE: help.syntax ARTICLE: \"b\" \"B\" ;" | 
					
						
							|  |  |  |     <string-reader> "ayy" parse-stream drop
 | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							|  |  |  |     "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"a\" \"A\" { $subsection \"b\" } ;" | 
					
						
							|  |  |  |     <string-reader> "ayy" parse-stream drop
 | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							|  |  |  |     "IN: ayy USE: help.syntax ARTICLE: \"c\" \"C\" ;" | 
					
						
							|  |  |  |     <string-reader> "ayy" parse-stream drop
 | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							|  |  |  |     "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"a\" \"A\" { $subsection \"c\" } ;" | 
					
						
							|  |  |  |     <string-reader> "ayy" parse-stream drop
 | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ | 
					
						
							|  |  |  |     [ | 
					
						
							|  |  |  |         "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"yyy\" \"YYY\" ; ARTICLE: \"xxx\" \"XXX\" { $subsection \"yyy\" } ; ARTICLE: \"yyy\" \"YYY\" ;" | 
					
						
							|  |  |  |         <string-reader> "parent-test" parse-stream drop
 | 
					
						
							| 
									
										
										
										
											2008-02-06 14:47:19 -05:00
										 |  |  |     ] [ :1 ] recover
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ "xxx" ] [ "yyy" article-parent ] unit-test | 
					
						
							| 
									
										
										
										
											2009-10-23 04:27:45 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ARTICLE: "crossref-test-1" "Crossref test 1" | 
					
						
							|  |  |  | "Hello world" ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ARTICLE: "crossref-test-2" "Crossref test 2" | 
					
						
							|  |  |  | { $markup-example { $subsection "crossref-test-1" } } ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ V{ } ] [ "crossref-test-2" >link article-children ] unit-test |