From ba39dc1adb6420e51b0d5b6a882538722246626e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20B=20Nagy?= <20251272+BNAndras@users.noreply.github.com> Date: Sat, 16 Aug 2025 19:58:11 -0700 Subject: [PATCH] Reformat expected lines in `food-chain` --- .../practice/food-chain/food_chain.vader | 127 ++++++++++++++++-- 1 file changed, 116 insertions(+), 11 deletions(-) diff --git a/exercises/practice/food-chain/food_chain.vader b/exercises/practice/food-chain/food_chain.vader index df2c5eb..348c440 100644 --- a/exercises/practice/food-chain/food_chain.vader +++ b/exercises/practice/food-chain/food_chain.vader @@ -1,60 +1,165 @@ - Execute (fly): let g:endVerse = 1 let g:startVerse = 1 - let g:expected = ['I know an old lady who swallowed a fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (spider): let g:endVerse = 2 let g:startVerse = 2 - let g:expected = ['I know an old lady who swallowed a spider.', 'It wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a spider.", + \ "It wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (bird): let g:endVerse = 3 let g:startVerse = 3 - let g:expected = ['I know an old lady who swallowed a bird.', 'How absurd to swallow a bird!', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a bird.", + \ "How absurd to swallow a bird!", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (cat): let g:endVerse = 4 let g:startVerse = 4 - let g:expected = ['I know an old lady who swallowed a cat.', 'Imagine that, to swallow a cat!', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a cat.", + \ "Imagine that, to swallow a cat!", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (dog): let g:endVerse = 5 let g:startVerse = 5 - let g:expected = ['I know an old lady who swallowed a dog.', 'What a hog, to swallow a dog!', 'She swallowed the dog to catch the cat.', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a dog.", + \ "What a hog, to swallow a dog!", + \ "She swallowed the dog to catch the cat.", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (goat): let g:endVerse = 6 let g:startVerse = 6 - let g:expected = ['I know an old lady who swallowed a goat.', 'Just opened her throat and swallowed a goat!', 'She swallowed the goat to catch the dog.', 'She swallowed the dog to catch the cat.', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a goat.", + \ "Just opened her throat and swallowed a goat!", + \ "She swallowed the goat to catch the dog.", + \ "She swallowed the dog to catch the cat.", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (cow): let g:endVerse = 7 let g:startVerse = 7 - let g:expected = ['I know an old lady who swallowed a cow.', 'I don''t know how she swallowed a cow!', 'She swallowed the cow to catch the goat.', 'She swallowed the goat to catch the dog.', 'She swallowed the dog to catch the cat.', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a cow.", + \ "I don't know how she swallowed a cow!", + \ "She swallowed the cow to catch the goat.", + \ "She swallowed the goat to catch the dog.", + \ "She swallowed the dog to catch the cat.", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (horse): let g:endVerse = 8 let g:startVerse = 8 - let g:expected = ['I know an old lady who swallowed a horse.', 'She''s dead, of course!'] + let g:expected = [ + \ "I know an old lady who swallowed a horse.", + \ "She's dead, of course!"] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (multiple verses): let g:endVerse = 3 let g:startVerse = 1 - let g:expected = ['I know an old lady who swallowed a fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a spider.', 'It wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a bird.', 'How absurd to swallow a bird!', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.'] + let g:expected = [ + \ "I know an old lady who swallowed a fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a spider.", + \ "It wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a bird.", + \ "How absurd to swallow a bird!", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die."] AssertEqual g:expected, Recite(g:endVerse, g:startVerse) Execute (full song): let g:endVerse = 8 let g:startVerse = 1 - let g:expected = ['I know an old lady who swallowed a fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a spider.', 'It wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a bird.', 'How absurd to swallow a bird!', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a cat.', 'Imagine that, to swallow a cat!', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a dog.', 'What a hog, to swallow a dog!', 'She swallowed the dog to catch the cat.', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a goat.', 'Just opened her throat and swallowed a goat!', 'She swallowed the goat to catch the dog.', 'She swallowed the dog to catch the cat.', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a cow.', 'I don''t know how she swallowed a cow!', 'She swallowed the cow to catch the goat.', 'She swallowed the goat to catch the dog.', 'She swallowed the dog to catch the cat.', 'She swallowed the cat to catch the bird.', 'She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.', 'She swallowed the spider to catch the fly.', 'I don''t know why she swallowed the fly. Perhaps she''ll die.', '', 'I know an old lady who swallowed a horse.', 'She''s dead, of course!'] + let g:expected = [ + \ "I know an old lady who swallowed a fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a spider.", + \ "It wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a bird.", + \ "How absurd to swallow a bird!", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a cat.", + \ "Imagine that, to swallow a cat!", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a dog.", + \ "What a hog, to swallow a dog!", + \ "She swallowed the dog to catch the cat.", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a goat.", + \ "Just opened her throat and swallowed a goat!", + \ "She swallowed the goat to catch the dog.", + \ "She swallowed the dog to catch the cat.", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a cow.", + \ "I don't know how she swallowed a cow!", + \ "She swallowed the cow to catch the goat.", + \ "She swallowed the goat to catch the dog.", + \ "She swallowed the dog to catch the cat.", + \ "She swallowed the cat to catch the bird.", + \ "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.", + \ "She swallowed the spider to catch the fly.", + \ "I don't know why she swallowed the fly. Perhaps she'll die.", + \ "", + \ "I know an old lady who swallowed a horse.", + \ "She's dead, of course!"] AssertEqual g:expected, Recite(g:endVerse, g:startVerse)