vocabs.metadata.resources,help.pdf: gather used

char-rename
Björn Lindqvist 2016-11-26 09:40:54 +01:00
parent fe0f2902a0
commit 581e2e2a62
3 changed files with 9 additions and 2 deletions

View File

@ -11,6 +11,13 @@ IN: vocabs.metadata.resources.tests
"*.txt" { "foo.bar" "foo.factor" } match-pattern
] [ resource-missing? ] must-fail-with
! match-patterns
{
{ "a.txt" "b.pdf" }
} [
{ "*.txt" "*.pdf" } { "a.txt" "b.pdf" "a" } match-patterns
] unit-test
! vocab-resource-files
{ { "bar" "bas" "foo" } }
[ "vocabs.metadata.resources.test.1" vocab-resource-files natural-sort ] unit-test

View File

@ -29,7 +29,7 @@ ERROR: resource-missing pattern ;
[ resource-missing ] [ nip ] if-empty ;
: match-patterns ( patterns filenames -- filenames' )
'[ _ match-pattern ] map concat members ;
'[ _ match-pattern ] gather ;
: vocab-resource-files ( vocab -- filenames )
[ vocab-resources ] [ vocab-dir-in-root ] bi

View File

@ -12,7 +12,7 @@ IN: help.pdf
: next-articles ( str -- seq )
lookup-article content>> [ array? ] filter
[ first \ $subsections eq? ] filter
[ rest [ string? ] filter ] map concat members ;
[ rest [ string? ] filter ] gather ;
: topic>pdf ( str -- pdf )
[