@@ 1,7 1,8 @@
#!/bin/sh
%const NAME: value
-% DATE: "$(date) $(cat /dev/urandom | base64 | head -n 1)"
+% DATE: "$(date)"
+% LONGTEXT: "$(cat /dev/urandom | base64 | head -n 1)"
Describe "receiving"
Include lib/text.sh
@@ 9,14 10,19 @@ Describe "receiving"
When call recieving "Receiving plain text at $DATE" ShellSpec
The output should equal "Receiving plain text at $DATE"
End
+ It 'Can receive emoji message on pinephone'
+ When call recieving "Receiving emoji text at 🤔 🤣$DATE" ShellSpec
+ The output should equal "Receiving emoji text at 🤔 🤣$DATE"
+ End
End
Describe "sending"
Include lib/text.sh
+ # This is inspired by https://github.com/shellspec/shellspec/issues/199
setup() {
. ./.secrets
./go-sendxmpp -l > /tmp/recv &
- sleep 1
pid=$!
+ sleep 1
}
BeforeRun setup
cleanup() {
@@ 28,4 34,12 @@ Describe "sending"
When run sending "Sending plain text at $DATE" ShellSpec
The output should equal "Sending plain text at $DATE"
End
+ It 'Can send emoji message from pinephone'
+ When run sending "Sending emoji text at 🤔 🤣$DATE" ShellSpec
+ The output should equal "Sending emoji text at 🤔 🤣$DATE"
+ End
+ It 'Can send long message from pinephone'
+ When run sending "Sending long text at $DATE $LONGTEXT" ShellSpec
+ The output should equal "Sending long text at $DATE $LONGTEXT"
+ End
End