Skip to content

Commit

Permalink
Merge pull request #23 from sahedAnis/master
Browse files Browse the repository at this point in the history
Removing Phrase library
  • Loading branch information
Ducasse authored Dec 3, 2022
2 parents d21b903 + 4a69725 commit 51371a1
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests
library

^ BibPhraseLibrary default
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tests
testSequenceWithInitiator

| p library visitor |
library := self library.
p := BibSequencePhrase new
addField: #author;
initiatorText: 'In ';
yourself.
visitor := BibTextRenderer new.
visitor render: p for: entry.
self
assert: visitor contents
equals: 'In St\''ephane Ducasse and Damien Pollet'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tests
testSequenceWithSeparator

| p library visitor |
library := self library.
p := BibSequencePhrase new
addField: #author;
addField: #title;
separatorText: ', ';
yourself.
visitor := BibTextRenderer new.
visitor render: p for: entry.
self
assert: visitor contents
equals: 'St\''ephane Ducasse and Damien Pollet, Fingerprints'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tests
testSequenceWithTerminator

| p library visitor |
library := self library.
p := BibSequencePhrase new
addField: #author;
initiatorText: 'In ';
terminatorText: '!';
yourself.
visitor := BibTextRenderer new.
visitor render: p for: entry.
self
assert: visitor contents
equals: 'In St\''ephane Ducasse and Damien Pollet!'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tests
testSequenceWithoutSeparator

| p library visitor |
library := self library.
p := BibSequencePhrase new
addField: #author;
addField: #title;
initiatorText: 'In ';
yourself.
visitor := BibTextRenderer new.
visitor render: p for: entry.
self
assert: visitor contents
equals: 'In St\''ephane Ducasse and Damien PolletFingerprints'
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tests
testVisitEntryWithFieldProducesContents

| p library visitor |
library := self library.
p := BibSequencePhrase new
addField: #author;
terminatorText: ' (Cool.)';
yourself.
visitor := BibTextRenderer new.
visitor render: p for: entry.
self
assert: visitor contents
equals: 'St\''ephane Ducasse and Damien Pollet (Cool.)'
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tests
testVisitEntryWithNoFieldProducesEmpty

| p library visitor |
library := self library.
p := BibSequencePhrase new
addField: #editor;
terminatorText: ' (Ed.)';
yourself.
visitor := BibTextRenderer new.
visitor render: p for: entry.
self assert: visitor contents isEmpty

0 comments on commit 51371a1

Please sign in to comment.