Introduction
Introduction Statistics Contact Development Disclaimer Help
invalid_decode.sh - sfeed_tests - sfeed tests and RSS and Atom files
git clone git://git.codemadness.org/sfeed_tests
Log
Files
Refs
README
LICENSE
---
invalid_decode.sh (827B)
---
1 #!/bin/sh
2 # test decoding a feed.
3 # test invalid characters, invalid text-encoding names, etc.
4
5 tmppath=$(mktemp -d)
6 tmpfeed="/tmp/testfeed.$$"
7 tmprc="/tmp/sfeedrc.$$"
8
9 printf '\x80' > "${tmpfeed}"
10 printf 'abc' > "${tmpfeed}2"
11 printf 'abc' > "${tmpfeed}3" # OK
12 printf '%s\n' '<?xml version="1.0" encoding="UTF-8"?>' > "${tmpfeed}4" #…
13 printf '%s\n' '<?xml version="1.0" encoding="UTF-69"?>' > "${tmpfeed}5"
14
15 cat > "$tmprc" <<!__EOF__
16 sfeedpath="$tmppath"
17
18 feeds() {
19 # feed <name> <url> [baseurl] [encoding]
20 feed "testfeed" "file://$tmpfeed" "" "utf-16"
21 feed "testfeed2" "file://${tmpfeed}2" "" "invalid-name"
22 feed "testfeed3" "file://${tmpfeed}3"
23 feed "testfeed4" "file://${tmpfeed}4"
24 feed "testfeed5" "file://${tmpfeed}5" "" "utf-69" # override enc…
25 }
26 !__EOF__
27
28 sfeed_update "$tmprc"
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.