diff --git a/src/main.rs b/src/main.rs index 2fa49cf..16dc23c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,8 +51,8 @@ struct Args { #[clap(short = 'f', long)] nimi: Option, - #[clap(short = 'W', long)] - pakala: Option, + #[clap(short = 'W', long, default_value = "40")] + pakala: usize, #[clap(short = 'n', long)] pakala_ala: bool, @@ -191,7 +191,7 @@ impl Args { CritterConfig::config_from_string(&eyes, &tongue, &line, &object, &Some(format), &name); let bubble_config = BubbleConfig::config_from_string( critter_config.template.anchor, - DEFAULT_MAXIMUM_LINE_LENGTH, + self.pakala, self.pakala_ala, None, ); diff --git a/test b/test index 54bd882..b3d8a98 100755 --- a/test +++ b/test @@ -1,11 +1,8 @@ #!/usr/bin/fish -echo 1234567890123456789012345678901234567890123456789012345678901234567890 | ./target/debug/kijetesantakaluotokieni +echo 123456789\|123456789\|123456789\|123456789\|123456789\|123456789\|123456789\| | ./target/debug/kijetesantakaluotokieni -echo -e "“Oh, you wicked little thing!” cried Alice, catching up the kitten, and giving it a little kiss to make it understand that it was in disgrace. “Really, Dinah ought to have taught you better manners!”\n\n“You ought, Dinah, you know you ought!” she added, looking reproachfully at the old cat, and speaking in as cross a voice as she could manage—and then she scrambled back into the arm-chair, taking the kitten and the worsted with her, and began winding up the ball again." | ./target/debug/kijetesantakaluotokieni - - -#echo -e "'Oh, you wicked little thing!' cried Alice, catching up the kitten, and giving it a little kiss to make it understand that it was in disgrace. 'Really, Dinah ought to have taught you better manners!'\n\n'You ought, Dinah, you know you ought!' she added, looking reproachfully at the old cat, and speaking in as cross a voice as she could manage—and then she scrambled back into the arm-chair, taking the kitten and the worsted with her, and began winding up the ball again." | ./target/debug/kijetesantakaluotokieni +echo 123456789\|123456789\|123456789\|123456789\|123456789\|123456789\|123456789\| | ./target/debug/kijetesantakaluotokieni --pakala 60 echo "Белеет парус одинокий В тумане моря голубом!.. @@ -22,7 +19,9 @@ echo | ./target/debug/kijetesantakaluotokieni echo mu | ./target/debug/kijetesantakaluotokieni echo 1234567890123 | ./target/debug/kijetesantakaluotokieni - +echo 12345678901234 | ./target/debug/kijetesantakaluotokieni echo Pingo pi n\'t go li sitelen | ./target/debug/kijetesantakaluotokieni +figlet the nineties | ./target/debug/kijetesantakaluotokieni --pakala-ala + echo 420 lol | ./target/debug/kijetesantakaluotokieni \ No newline at end of file