Skip to content

Commit

Permalink
varnishadm: Add coverage for heredoc
Browse files Browse the repository at this point in the history
  • Loading branch information
walid-git committed Nov 30, 2023
1 parent ea50d6f commit 18982c2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bin/varnishtest/tests/u00001.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,17 @@ shell { varnishadm -e -n ${v1_name} < cli_file.txt | diff -u expected_success.tx

shell { cat cli_file.txt | varnishadm -e -n ${v1_name} }
shell { cat cli_file.txt | varnishadm -e -n ${v1_name} | diff -u expected_success.txt - }

shell {
cat > cli_heredoc.txt <<-EOF1
vcl.inline bar << EOF2
vcl 4.1;

backend default none;
EOF2
EOF1
}

shell { varnishadm -e -p -n ${v1_name} < cli_heredoc.txt | grep "200 0" }
shell { varnishadm -n ${v1_name} vcl.discard bar }
shell { cat cli_heredoc.txt | varnishadm -e -p -n ${v1_name} | grep "200 0" }

0 comments on commit 18982c2

Please sign in to comment.