diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd79dc5..c42c844 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ jobs: runs-on: ubuntu-latest env: MIX_ENV: test - LIBWBXML_FORCE_BUILD: true steps: - name: Checkout repository @@ -21,14 +20,12 @@ jobs: version-file: .tool-versions version-type: strict - - name: Install native dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libexpat1-dev - - name: Install dependencies run: mix deps.get + - name: Compile + run: mix compile --warnings-as-errors + - name: Run tests run: mix test --warnings-as-errors diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8d74a11..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Release - -on: - push: - tags: - - v* - -permissions: - contents: write - pull-requests: write - -jobs: - release-linux: - name: Release linux - runs-on: ubuntu-latest - - env: - MIX_ENV: prod - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Set up Elixir and Erlang - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - - name: Install system dependecies - run: | - sudo apt-get update - sudo apt-get install -y build-essential automake autoconf pkg-config bc m4 unzip zip \ - libexpat1-dev - - - name: Install dependencies - run: mix deps.get - - - name: Create precompiled library - run: | - export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache - mkdir -p "${ELIXIR_MAKE_CACHE_DIR}" - mix elixir_make.precompile - - - name: Publish release artifacts - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v2 - with: - files: cache/*.tar.gz - - release-macos: - name: Release macos - runs-on: macos-latest - - env: - MIX_ENV: prod - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Set up Elixir and Erlang - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - - name: Install dependencies - run: mix deps.get - - - name: Create precompiled library - run: | - export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache - mkdir -p "${ELIXIR_MAKE_CACHE_DIR}" - mix elixir_make.precompile - - - name: Publish release artifacts - if: startsWith(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v2 - with: - files: cache/*.tar.gz diff --git a/.gitignore b/.gitignore index afe36ca..33a8c97 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ erl_crash.dump *.ez # Ignore package tarball (built via "mix hex.build"). -wbxml_nif-*.tar +libwbxml-*.tar # Temporary files, for example, from tests. /tmp/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9069498 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,47 @@ +# Changelog + +## 0.2.0 + +Rewrite in pure Elixir. The C library and the NIF are gone: no C compiler, +no expat, no `elixir_make`, no precompiled artifacts. The codec is a port of +libwbxml 0.11.10 (commit `e58b1f19f11dbadff53e5b486b8c4b16639a656a`) with +the same token tables and byte-identical output, verified against the +upstream test suite and against goldens generated from the C tools. + +### Breaking changes + +* `Libwbxml.decode/1` returns `{:ok, String.t()}` (a binary) instead of a + charlist. +* Errors are `{:error, reason}` where `reason` is an atom + (`:unknown_public_id`, `:strtbl_length`, ...) instead of a charlist with + the C library's message. `Libwbxml.Error.message/1` returns that message + and `Libwbxml.Error.from_message/1` maps a message back to its atom. +* Invalid arguments and unknown or malformed options raise `ArgumentError`. +* The package licence is now LGPL-2.1-or-later (previously "MIT for the + wrapper, LGPL-2.1 for libwbxml"): the Elixir code is a derivative work of + the C library. + +Defaults are unchanged (`encode/1`: anonymous, string table on, WBXML 1.3; +`decode/1`: language `:activesync`, indent format with delta 0), so the +bytes and XML text produced for the default calls are the same as in 0.1.x. + +### Added + +* `Libwbxml.encode/2` options: `:version`, `:string_table`, `:anonymous`, + `:preserve_whitespace`, `:language`. +* `Libwbxml.decode/2` options: `:language` (including `nil` to detect the + language from the document's public ID), `:format` + (`:indent | :compact | :canonical`), `:indent`, `:charset`, + `:preserve_whitespace`. +* `Libwbxml.encode!/2` and `Libwbxml.decode!/2`, raising `Libwbxml.Error`. +* `Libwbxml.languages/0`: all 29 languages of the C library (WML, WTA, + Channel, SI, SL, CO, PROV, EMN, DRMREL, OTA Settings, SyncML/DevInf/MetInf + 1.0-1.2, DM DDF 1.2, WV-CSP 1.1/1.2, AirSync, ActiveSync, ConML). +* Charset conversion for UTF-8, US-ASCII, ISO-8859-1, UTF-16 and UCS-2; + other charsets return `{:error, :no_charset_conv}`. +* `Libwbxml.Error` with the full upstream error table. + +## 0.1.0 + +Initial release: an Erlang NIF wrapping the vendored libwbxml 0.11.10 C +library, with `encode/1` and `decode/1` hard-wired to ActiveSync. diff --git a/vendor/libwbxml/GNU-LGPL b/LICENSE similarity index 100% rename from vendor/libwbxml/GNU-LGPL rename to LICENSE diff --git a/Makefile b/Makefile deleted file mode 100644 index 0993ebd..0000000 --- a/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -PRIV_DIR := $(MIX_APP_PATH)/priv -TARGET_NAME := wbxml_nif -TARGET_EXT := so -TARGET_TRIPLET := $(if $(CC_PRECOMPILER_CURRENT_TARGET),$(CC_PRECOMPILER_CURRENT_TARGET),host) -BUILD_DIR := $(CURDIR)/_build/native/$(MIX_ENV)/$(TARGET_TRIPLET) -OBJ_DIR := $(BUILD_DIR)/obj -TARGET_PATH := $(PRIV_DIR)/$(TARGET_NAME).$(TARGET_EXT) -ERTS_INCLUDE_DIR ?= $(ERL_INCLUDE_DIR) -EXPAT_CFLAGS ?= $(shell pkg-config --cflags expat 2>/dev/null) -EXPAT_LIBS ?= $(or $(shell pkg-config --libs expat 2>/dev/null),-lexpat) - -WBXML_SOURCES := \ - vendor/libwbxml/src/wbxml_base64.c \ - vendor/libwbxml/src/wbxml_buffers.c \ - vendor/libwbxml/src/wbxml_charset.c \ - vendor/libwbxml/src/wbxml_conv.c \ - vendor/libwbxml/src/wbxml_elt.c \ - vendor/libwbxml/src/wbxml_encoder.c \ - vendor/libwbxml/src/wbxml_errors.c \ - vendor/libwbxml/src/wbxml_lists.c \ - vendor/libwbxml/src/wbxml_log.c \ - vendor/libwbxml/src/wbxml_mem.c \ - vendor/libwbxml/src/wbxml_parser.c \ - vendor/libwbxml/src/wbxml_tables.c \ - vendor/libwbxml/src/wbxml_tree.c \ - vendor/libwbxml/src/wbxml_tree_clb_wbxml.c \ - vendor/libwbxml/src/wbxml_tree_clb_xml.c - -NIF_SOURCE := native/wbxml_nif.c -SOURCES := $(WBXML_SOURCES) $(NIF_SOURCE) -OBJECTS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(SOURCES)) - -CPPFLAGS += -Inative -Ivendor/libwbxml/src -I$(ERTS_INCLUDE_DIR) $(EXPAT_CFLAGS) -CFLAGS ?= -O2 -fPIC - -UNAME_S := $(shell uname -s) - -ifeq ($(UNAME_S),Darwin) - LDFLAGS += -dynamiclib -undefined dynamic_lookup -else - LDFLAGS += -shared -endif - -all: $(TARGET_PATH) - -$(TARGET_PATH): $(OBJECTS) - @mkdir -p "$(PRIV_DIR)" - $(CC) $(OBJECTS) $(LDFLAGS) $(EXPAT_LIBS) -o "$@" - -$(OBJ_DIR)/%.o: %.c - @if [ -z "$(ERTS_INCLUDE_DIR)" ]; then echo "ERTS_INCLUDE_DIR or ERL_INCLUDE_DIR must be set"; exit 1; fi - @mkdir -p "$(dir $@)" - $(CC) $(CPPFLAGS) $(CFLAGS) -c "$<" -o "$@" - -clean: - rm -rf "$(CURDIR)/_build/native" - rm -f "$(PRIV_DIR)/$(TARGET_NAME).so" "$(PRIV_DIR)/$(TARGET_NAME).dylib" diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..5ab2ce1 --- /dev/null +++ b/NOTICE @@ -0,0 +1,33 @@ +libwbxml for Elixir +Elixir port Copyright (C) 2026 Jump AI + +This package is a derivative work of libwbxml, the WBXML Library +(https://github.com/libwbxml/libwbxml), version 0.11.10, tag +libwbxml-0.11.10, commit e58b1f19f11dbadff53e5b486b8c4b16639a656a: + + libwbxml, the WBXML Library. + Copyright (C) 2002-2008 Aymerick Jehanne + Copyright (C) 2008-2011 Michael Bell + Copyright (C) 2011,2014 Michael Bell + Copyright (c) 2022 Open Mobile Platform LLC. + +The token tables (lib/libwbxml/tables/generated/) were generated from +upstream's wbxml_tables.c, the encoder, parser, XML reader/writer, charset, +base64 and error modules are ports of the corresponding upstream C sources, +and the test fixtures under test/fixtures/upstream/ and test/fixtures/fuzz/ +are upstream's test documents. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library (see the LICENSE file); if not, write +to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA diff --git a/README.md b/README.md index 41c3a52..58c8376 100644 --- a/README.md +++ b/README.md @@ -1,81 +1,229 @@ -# libwbxml - Native WBXML encoder/decoder for Elixir +# libwbxml -This package wraps the C reference implementation of *libwbxml* and exposes -two Elixir functions: +A pure-Elixir WBXML encoder/decoder. + +`Libwbxml` is a port of [libwbxml](https://github.com/libwbxml/libwbxml) +0.11.10 (the C reference implementation of the WAP Binary XML format) to +Elixir. It uses the same token tables as upstream, produces byte-identical +output, and is verified against the upstream test suite plus byte-exact +goldens generated from the C tools. There is no native code and no C +toolchain: XML parsing is done with OTP's `:xmerl_sax_parser`, and the +package has no runtime dependencies. + +It supports all 29 WBXML languages of the C library, with Microsoft +Exchange ActiveSync as the primary target. + +## Installation ```elixir -{:ok, wbxml_binary} = Libwbxml.encode(xml_string) -{:ok, xml_string} = Libwbxml.decode(wbxml_binary) +def deps do + [ + {:libwbxml, "~> 0.2.0"} + ] +end ``` -the dependency is compiled. -The heavy lifting happens inside a C reference implementation of *libwbxml*. -This project compiles it **together with** the Erlang NIF (`wbxml_nif.so`) -via the [`elixir_make`](https://hex.pm/packages/elixir_make) compiler. -Because the compiler hook runs **before** the Elixir code is loaded, -`Libwbxml.load_nif/0` is guaranteed to succeed as long as your build tool-chain -is present. +Requires Elixir 1.19 or later. -The upstream `libwbxml` sources are vendored in `vendor/libwbxml/` and currently -pinned to `libwbxml-0.11.10` (`e58b1f19f11dbadff53e5b486b8c4b16639a656a`). See -`vendor/libwbxml/VENDORED_VERSION` for the pinned source metadata. +## Usage -When release artifacts are available, `libwbxml` will prefer downloading a -precompiled NIF for the current target. Set `LIBWBXML_FORCE_BUILD=true` to skip -artifact download and force a local build from the vendored sources. +```elixir +xml = ~s( + +1) -## Compiler task +{:ok, wbxml} = Libwbxml.encode(xml) +#=> {:ok, <<0x03, 0x01, 0x6A, 0x00, 0x00, 0x0D, 0x45, 0x00, 0x00, 0x4E, 0x03, ?1, 0x00, 0x01, 0x01>>} -* `mix compile` - builds native artefacts through `elixir_make` -* `mix clean` - removes artefacts and the native build directory -* `MIX_ENV=prod mix elixir_make.precompile` - builds release tarballs for the - configured targets +{:ok, xml} = Libwbxml.decode(wbxml) +#=> {:ok, "\n\n\n1\n\n"} +``` -The task runs automatically when the dependency is compiled; you almost never -need to invoke it manually. +(`Status` lives on the AirSync code page, hence the page switch in the +binary and the `xmlns` on the way back; this is exactly what `wbxml2xml` +prints.) -## Development workflow +The bang variants return the result directly or raise `Libwbxml.Error`: -1. `git clone ...` -2. `mix test` - the very first run compiles the vendored *libwbxml* sources. - Subsequent test runs are instant. +```elixir +wbxml = Libwbxml.encode!(xml) +xml = Libwbxml.decode!(wbxml, language: :syncml12, format: :indent, indent: 2) +``` -Useful Mix task: +### `Libwbxml.encode(xml, opts \\ [])` -* `mix compile` - (re)compile native artefacts through the project `Makefile` +Encodes an XML document (a string or any iodata) as WBXML and returns +`{:ok, binary}` or `{:error, reason}`. The language is detected from the +DOCTYPE public/system identifier, or from the root element and its +namespace, unless `:language` forces one. -## Testing +| Option | Values | Default | Meaning | +|------------------------|-----------------------------------------|----------|---------| +| `:version` | `:"1.0"`, `:"1.1"`, `:"1.2"`, `:"1.3"` | `:"1.3"` | WBXML version byte of the output. | +| `:string_table` | boolean | `true` | Build a string table; required to encode names that have no token (literals). | +| `:anonymous` | boolean | `true` | Omit the public ID and write `0x01` ("unknown") instead. | +| `:preserve_whitespace` | boolean | `false` | Keep whitespace-only text nodes instead of dropping them. | +| `:language` | one of `Libwbxml.languages/0`, or `nil` | `nil` | Force the language instead of detecting it. | + +The defaults reproduce `xml2wbxml -a` from the C distribution, which is what +this library has always produced. Use `anonymous: false` to write the +document's real public ID (`xml2wbxml` defaults). -The test-suite exercises both the Elixir wrapper and the NIF round-trip. It -does **not** attempt to validate the *semantics* of the C library itself - we -trust the upstream test-suite for that - only that our build & FFI plumbing -is correct. +### `Libwbxml.decode(wbxml, opts \\ [])` -## Release workflow +Decodes a WBXML binary into an XML document (a UTF-8 string) and returns +`{:ok, string}` or `{:error, reason}`. -Releases now have one manual step: after GitHub has the precompiled tarballs, -`checksum.exs` must be regenerated and committed by hand. +| Option | Values | Default | Meaning | +|------------------------|------------------------------------------|---------------|---------| +| `:language` | one of `Libwbxml.languages/0`, or `nil` | `:activesync` | Language to decode with. `nil` detects it from the document's public ID (ActiveSync documents carry none, hence the default). | +| `:format` | `:indent`, `:compact`, `:canonical` | `:indent` | XML generation style: one element per line, everything on one line, or canonical XML. | +| `:indent` | non-negative integer | `0` | Spaces per nesting level in `:indent` format. | +| `:charset` | charset name (`"UTF-8"`, `:"ISO-8859-1"`), IANA MIBenum, or `nil` | `nil` | Charset to assume when the document does not declare one (`nil` means UTF-8). | +| `:preserve_whitespace` | boolean | `false` | Keep whitespace-only text nodes instead of dropping them. | -1. Cut and push the release tag: +The defaults reproduce `wbxml2xml -l ACTIVESYNC`: an XML declaration, an +ActiveSync DOCTYPE and one element per line with no indentation. Pass +`language: nil` to decode any document that carries a WBXML public ID +(SyncML, WML, SI, ...). - ```sh - git tag vX.Y.Z - git push origin vX.Y.Z - ``` +### Error handling -2. Wait for `.github/workflows/release.yml` to finish. Pushing a `v*` tag still - builds the precompiled artifacts, creates or updates the corresponding - GitHub Release, and uploads the generated tarballs. +Errors are `{:error, reason}` where `reason` is an atom named after the +upstream `WBXMLError` code (`:unknown_public_id`, `:strtbl_disabled`, +`:xml_parsing_failed`, `:end_of_buffer`, ...). The full list is +`Libwbxml.Error.reasons/0`, and `Libwbxml.Error.message/1` returns +upstream's English description: -3. Regenerate `checksum.exs` from the released artifacts: +```elixir +Libwbxml.decode(<<1, 2, 3, 4>>) +#=> {:error, :strtbl_length} + +Libwbxml.Error.message(:strtbl_length) +#=> "Bad String Table Length" - ```sh - MIX_ENV=prod mix elixir_make.checksum --all --ignore-unavailable - ``` +Libwbxml.encode("", language: :wml13, string_table: false) +#=> {:error, :strtbl_disabled} +``` -4. Commit the updated `checksum.exs` to `main` through your normal review - process. +Invalid arguments (a non-binary document, an unknown option, an option with +the wrong type) raise `ArgumentError`; the bang variants raise +`Libwbxml.Error` for conversion failures. + +### Languages + +`Libwbxml.languages/0` lists the supported languages. On encode the +language is selected by the DOCTYPE public ID (case-insensitive), then the +system ID, then the root element; on decode by the WBXML public ID in the +document unless `:language` is given. + +| Language atom | XML DOCTYPE public ID | Root element | +|-----------------|---------------------------------------------|-----------------------| +| `:wml10` | `-//WAPFORUM//DTD WML 1.0//EN` | `wml` | +| `:wml11` | `-//WAPFORUM//DTD WML 1.1//EN` | `wml` | +| `:wml12` | `-//WAPFORUM//DTD WML 1.2//EN` | `wml` | +| `:wml13` | `-//WAPFORUM//DTD WML 1.3//EN` | `wml` | +| `:wta10` | `-//WAPFORUM//DTD WTA 1.0//EN` | `wtai` | +| `:wtawml12` | `-//WAPFORUM//DTD WTA-WML 1.2//EN` | `wta-wml` | +| `:channel11` | `-//WAPFORUM//DTD CHANNEL 1.1//EN` | `channel` | +| `:channel12` | `-//WAPFORUM//DTD CHANNEL 1.2//EN` | `channel` | +| `:si10` | `-//WAPFORUM//DTD SI 1.0//EN` | `si` | +| `:sl10` | `-//WAPFORUM//DTD SL 1.0//EN` | `sl` | +| `:co10` | `-//WAPFORUM//DTD CO 1.0//EN` | `co` | +| `:prov10` | `-//WAPFORUM//DTD PROV 1.0//EN` | `wap-provisioningdoc` | +| `:emn10` | `-//WAPFORUM//DTD EMN 1.0//EN` | `emn` | +| `:drmrel10` | `-//OMA//DTD DRMREL 1.0//EN` | `o-ex:rights` | +| `:ota_settings` | none; `SYSTEM "characteristic-list.dtd"` | `CHARACTERISTIC-LIST` | +| `:syncml10` | `-//SYNCML//DTD SyncML 1.0//EN` | `SyncML` | +| `:devinf10` | `-//SYNCML//DTD DevInf 1.0//EN` | `DevInf` | +| `:syncml11` | `-//SYNCML//DTD SyncML 1.1//EN` | `SyncML` | +| `:devinf11` | `-//SYNCML//DTD DevInf 1.1//EN` | `DevInf` | +| `:metinf11` | `-//SYNCML//DTD MetInf 1.1//EN` | `MetInf` | +| `:syncml12` | `-//SYNCML//DTD SyncML 1.2//EN` | `SyncML` | +| `:devinf12` | `-//SYNCML//DTD DevInf 1.2//EN` | `DevInf` | +| `:metinf12` | `-//SYNCML//DTD MetInf 1.2//EN` | `MetInf` | +| `:dmddf12` | `-//OMA//DTD-DM-DDF 1.2//EN` | `MgmtTree` | +| `:wv_csp11` | `-//OMA//DTD WV-CSP 1.1//EN` | `WV-CSP-Message` | +| `:wv_csp12` | `-//OMA//DTD WV-CSP 1.2//EN` | `WV-CSP-Message` | +| `:airsync` | `-//AIRSYNC//DTD AirSync//EN` | `AirSync` | +| `:activesync` | `-//MICROSOFT//DTD ActiveSync//EN` | `ActiveSync` | +| `:conml` | `-//CONML//DTD ConML//EN` | `ConML` | + +WML 1.0 to 1.2 share the WML 1.3 tables, as in the default C build. + +### Character sets + +Documents in UTF-8, US-ASCII, ISO-8859-1, UTF-16 and UCS-2 are converted +to and from UTF-8 (`:unicode`). Any other declared charset returns +`{:error, :no_charset_conv}`, matching a libwbxml built without iconv. + +## Compatibility with 0.1.x + +0.1.x wrapped the C library in native code. 0.2.0 is a drop-in replacement for +the default paths with three API changes: + +* `decode/1` returns a binary (`String.t()`) instead of a charlist. +* Errors are `{:error, atom}` instead of `{:error, charlist}`; + `Libwbxml.Error.message/1` gives the old text and + `Libwbxml.Error.from_message/1` maps it back. +* Bad arguments and options raise `ArgumentError`. + +Defaults are unchanged: `encode/1` still writes an anonymous WBXML 1.3 +document with a string table and `decode/1` still forces the ActiveSync +language with the indent format at delta 0, so the bytes and the XML text +are identical to 0.1.x. + +## Testing + +`mix test` runs the whole suite (about 2,700 tests, ten seconds): + +* **Goldens.** Every document in the upstream `test/tools` corpus (221 + files, 12 languages) plus the project fixtures was converted once with the + C tools `xml2wbxml` and `wbxml2xml` from libwbxml at tag + `libwbxml-0.11.10` (commit `e58b1f19f11dbadff53e5b486b8c4b16639a656a`) in + every option combination that the API exposes. Those outputs live under + `test/fixtures/upstream/` and `test/fixtures/`, described by + `test/fixtures/upstream/manifest.exs`, and the Elixir codec must reproduce + each of them byte for byte. +* **Upstream round-trip suite.** A port of upstream's `launchTests.sh` and + `normalize_xml.pl`: encode, decode, normalise and compare, with the same + exclusions as upstream. +* **Upstream API tests.** Ports of the `check`-based `test/api` suites; see + `test/upstream/api/README.md` for what was ported, adapted or skipped. +* **Fuzz.** Upstream's crash reproducers, truncations and seeded byte flips + of every golden: `decode/2` must always return `{:ok, _}` or + `{:error, _}`. +* Unit tests for every module, with expected values taken from the C code. + +## Performance + +On an Apple M4 Max, the largest fixture (`wv-047.xml`, 12 KB of XML, +1.8 KB of WBXML) encodes in about 1.4 ms and decodes in about 0.5 ms; a +typical ActiveSync `Ping` takes 18 µs to encode and 3 µs to decode. + +## Releasing + +There are no precompiled artifacts. A release is a plain Hex publish from a +tag: + +```sh +git tag v0.2.0 +git push origin v0.2.0 +mix hex.publish +``` ## License -MIT for the Elixir wrapper. libwbxml itself is LGPL-2.1. +This package is licensed under the GNU Lesser General Public License, +version 2.1 or (at your option) any later version. See `LICENSE` for the +full text and `NOTICE` for the copyright notices. + +It is a derivative work of libwbxml, the WBXML Library, Copyright (C) +2002-2008 Aymerick Jehanne, Copyright (C) 2008-2011 Michael Bell, and +Copyright (c) 2022 Open Mobile Platform LLC, from tag `libwbxml-0.11.10` +(commit `e58b1f19f11dbadff53e5b486b8c4b16639a656a`). The token tables were +generated from upstream's `wbxml_tables.c`, the codec modules are ports of +the corresponding C sources, and the test fixtures are upstream's test +documents. + +Elixir port Copyright (C) 2026 Jump AI. diff --git a/REWRITE_PLAN.md b/REWRITE_PLAN.md new file mode 100644 index 0000000..d06ebad --- /dev/null +++ b/REWRITE_PLAN.md @@ -0,0 +1,575 @@ +# Plan: rewrite libwbxml in pure Elixir + +Goal: replace the vendored C `libwbxml` 0.11.10 + NIF with a native Elixir +implementation, validated by a port of the upstream test suite plus +byte-exact golden fixtures generated from the C reference **before** the C +code is deleted. Ends with no `elixir_make`, no `cc_precompiler`, no C, no +expat, no precompiled-artifact release flow. + +Everything below was verified against this repo and against a fresh clone of +upstream at tag `libwbxml-0.11.10` (commit `e58b1f1`, the same one vendored). + +--- + +## 0. Findings that shape the plan + +### 0.1 What the current NIF actually does (must be preserved as defaults) + +`native/wbxml_nif.c` hard-codes two conversions: + +| Function | C configuration | Effect | +|---|---|---| +| `Libwbxml.encode/1` | `xml2wbxml`, WBXML 1.3, string table **on**, `disable_public_id` (anonymous), ignorable whitespace dropped | Output header is `03 01 6A …` (version 1.3, public ID 0x01 "unknown", charset UTF-8). Language is chosen from the XML DOCTYPE / root element. | +| `Libwbxml.decode/1` | `wbxml2xml`, language **forced to ActiveSync**, gen type `INDENT`, indent delta 0, charset unknown (→ UTF-8) | Output is `\n\n` then one element per line with **no** indentation. Public ID inside the document is ignored. | + +Verified: `xml2wbxml -a` + `wbxml2xml -l ACTIVESYNC` (the upstream CLI tools) +produce output byte-identical to the NIF. That is the golden-generation recipe. + +Two API warts to decide on (see §1): +* `decode/1` returns a **charlist**, not a binary (`enif_make_string_len`). +* Errors are `{:error, charlist}` with upstream's English message. + +### 0.2 The vendored C library (what has to be ported) + +~20k lines in `vendor/libwbxml/src`, but the real work is much smaller: + +| File | Lines | Port? | Notes | +|---|---|---|---| +| `wbxml_tables.c` | 3909 | **Generate**, don't hand-port | Static token tables for 29 languages. See task 2.1. | +| `wbxml_encoder.c` | 4693 | Yes | Both Tree→WBXML and Tree→XML live here. ~40% is string-table construction and C buffer plumbing. | +| `wbxml_parser.c` | 2922 | Yes | WBXML→events. Includes language-specific opaque decoding (SI/EMN datetime, WV integer/datetime, SyncML embedded DevInf, OTA icon, DRMREL). | +| `wbxml_tree.c` + `wbxml_tree_clb_wbxml.c` | 1591 | Partly | Tree node structs + the callbacks that build a tree from parser events. Elixir version is a few structs. | +| `wbxml_tree_clb_xml.c` | 643 | Yes | expat callbacks → tree. Language detection, binary (base64) tags, SyncML CDATA/vObject hacks, embedded DevInf/DDF documents. | +| `wbxml_conv.c` | 386 | Yes (trivial) | Option structs and defaults. Becomes the public API options. | +| `wbxml_charset.c` | 346 | Yes (small) | Name↔MIB table. **This build has no iconv**, so today anything other than US-ASCII/UTF-8 returns `WBXML_ERROR_NO_CHARSET_CONV`. | +| `wbxml_base64.c`, `wbxml_errors.c` | 303 | Yes (trivial) | `Base` module + an error-code table. | +| `wbxml_buffers.c`, `wbxml_lists.c`, `wbxml_mem.c`, `wbxml_log.c`, `wbxml_elt.c` | ~1670 | No | C memory/containers. Elixir binaries and lists replace them. | + +XML parsing in C is done by **expat with namespace processing on** +(`XML_ParserCreateNS(NULL, '|')`): element/attribute names arrive as +`uri|local`, and `xmlns` attributes are consumed by the parser and never +reach the tree. The namespace URI is what selects the WBXML code page for +languages with a namespace table (SyncML, DevInf, DDF, AirSync, ActiveSync). + +### 0.3 The upstream test suite + +Upstream has three groups (`test/` in the upstream repo, **not** vendored here): + +1. **`test/tools/`: 221 XML documents in 12 directories**, driven by + `launchTests.sh` + `normalize_xml.pl`. For every file: `xml2wbxml`, then + `wbxml2xml`, then normalise both original and result and `diff -b`. + There are **no golden `.wbxml` files upstream**; it is a round-trip test only. + + | dir | files | DOCTYPE public ID | `wbxml2xml` flag | + |---|---|---|---| + | activesync | 14 | `-//MICROSOFT//DTD ActiveSync//EN` | | + | airsync | 4 | `-//AIRSYNC//DTD AirSync//EN` | `-l AIRSYNC` | + | conml | 2 | `-//CONML//DTD ConML//EN` | | + | ddf | 2 | `-//OMA//DTD-DM-DDF 1.2//EN` (`.ddf`), `-//SYNCML//DTD SyncML 1.2//EN` | `-l DMDDF12` for the `.ddf` file only | + | drmrel | 3 | `-//OMA//DTD DRMREL 1.0//EN` | **disabled upstream** (see quirk below) | + | emn | 17 | `-//WAPFORUM//DTD EMN 1.0//EN` | | + | ota | 3 | none; `SYSTEM "characteristic-list.dtd"` | `-l OTA` | + | prov | 8 | `-//WAPFORUM//DTD PROV 1.0//EN` | | + | si | 25 | `-//WAPFORUM//DTD SI 1.0//EN` | | + | sl | 13 | `-//WAPFORUM//DTD SL 1.0//EN` | | + | syncml | 14 | `-//SYNCML//DTD SyncML 1.1//EN` (13), `DevInf 1.1` (1) | | + | wv | 116 | `-//OMA//DTD WV-CSP 1.1//EN` | | + + Harness quirks that the Elixir port must reproduce deliberately: + * `NO_STR_TBL="-n"` is set on the first iteration and never cleared, so + **every** `xml2wbxml` run in the harness has the string table disabled. + That is why DRMREL fails ("String Table generation disabled: can't encode + Literal") and why upstream's CMake lists exclude `drmrel`. + * Three files are converted but **not compared**: `syncml-012.xml`, + `syncml-013.xml`, `activesync-032-formatted-base64.xml` (CDATA/base64 + re-formatting makes text comparison impossible). + * `normalize_xml.pl` (must be ported, it is the definition of "equal"): + drops comments; deletes `xmlns` attributes; re-indents by 2 spaces; + expands `` into `` + ``; escapes `"` `'` `<` `>` in text as + entities; trims trailing whitespace per text line; uppercases the + `encoding` in the XML declaration and adds `encoding="UTF-8"` if absent; + strips a `[]` internal subset from the DOCTYPE; and honours a + `` comment, which replaces the *next* text + node (used by `wv-021/022/023/106/107` because WV integers and datetimes + are normalised by the codec). Comparison is `diff -b`. + * Baseline with the C tools at this tag: 215 SUCCEEDED, 3 CDATA-skipped, + 3 drmrel FAILED (expected). Everything else must pass in Elixir too. + +2. **`test/api/`: 8 `check`-based C unit tests** (1100 lines). Portable ones: + `base64` (encode/decode incl. empty/NULL edge cases), `charset` + (name↔MIB for UTF-8, UTF-16, ISO-8859-1, US-ASCII), `errors` (every code + has a message; `BAD_DATETIME` message contains no `%`; unknown code → + "Unknown Error Code"), `parser_internals` (OMA datetime opaque decoding: + 7/6/5/4-byte inputs → `2002-04-16T06:40:12Z` / `…06:40:00Z` / `…06:00:00Z` + / `…00:00:00Z`; 3 bytes → bad-datetime error), `encoder_internals` + (building XML with no language → lang-table-undefined error), `conv` + (NULL params → bad-parameter). `buffers` and `lists` test C containers and + are mostly not applicable, except `test_conversion_base64`, + `test_conversion_hex`, `test_shrink_blanks`, `test_strip_blanks`, + `test_split_words` whose *semantics* matter to the encoder. + +3. **`test/fuzz/`: 3 crash reproducers** (`.fuzz` binaries, 150–2426 bytes). + Contract: `wbxml2xml` must return an error, not crash. + +### 0.4 Feasibility checks already done + +* `LIBWBXML_FORCE_BUILD=true mix test` builds the NIF and passes (4 tests). +* Upstream builds with `cmake` on this machine (expat 2.7.1 from Homebrew); + the CLI tools are at `build/tools/{xml2wbxml,wbxml2xml}` under the + scratchpad. Sub-agents should rebuild in the repo's `_build/` or a temp dir. +* OTP's `:xmerl_sax_parser` (with `:skip_external_dtd`) parses **all 221** + fixtures and delivers exactly the events the port needs: `startDTD + {name, public_id, system_id}`, `startElement {uri, local, qname, + [{uri, prefix, name, value}]}`, `startPrefixMapping`, `characters`, + `ignorableWhitespace`, `startCDATA`/`endCDATA`, `processingInstruction`, + `comment`. No Hex dependency for XML parsing is required. + +--- + +## 1. Decisions to confirm before hand-off (recommendations included) + +These change what sub-agents build. Defaults below are used unless overruled. + +1. **Return type of `decode/1`.** Recommend returning a **binary** (UTF-8 + `String.t()`), not a charlist. Callers already doing `to_string/1` keep + working. Breaking change → bump to `0.2.0`, note in README. +2. **Error shape.** Recommend `{:error, reason :: atom()}` using upstream's + error names in snake_case (`:unknown_public_id`, `:strtbl_disabled`, + `:xml_parsing_failed`, …), with `Libwbxml.Error.message/1` returning the + upstream English text. Full list in Appendix B. +3. **Default behaviour.** Keep today's defaults exactly (encode: anonymous + + string table + v1.3; decode: language `:activesync`, indent format with + delta 0) so this is a drop-in replacement, and expose everything else + through options (§2.1). Alternative: make decode auto-detect the language + by default; not recommended because ActiveSync has no WBXML public ID, so + the ActiveSync documents this library exists for would stop decoding. +4. **Language scope.** Port **all 29 languages** in the tables. The tables + are generated, not hand-written, so the marginal cost is near zero and it + keeps the upstream test suite fully applicable. +5. **Charsets.** UTF-8 and US-ASCII pass through, as today. Recommend also + implementing ISO-8859-1, UTF-16 and UCS-2 with `:unicode` (free). Other + charsets return `{:error, :no_charset_conv}` exactly as the current build. +6. **Licence.** The Elixir port is a derivative work of LGPL-2.1 code (and + the vendored fixtures/tables come from it). The package currently says + "MIT for the wrapper, LGPL for libwbxml". After the rewrite there is no + wrapper/library split. Someone (not a sub-agent) must decide whether the + package becomes LGPL-2.1+ or whether a clean-room approach is needed. The + plan proceeds on the assumption the package is relicensed **LGPL-2.1-or-later** + with attribution retained; a sub-agent will update the licence files and + `mix.exs` accordingly in Phase 3. +7. **Differential testing against the NIF during Phase 2.** Recommend yes: + Phase 1 renames the NIF module to `Libwbxml.Native` so the pure-Elixir + `Libwbxml` can coexist with it until Phase 3, and a `:native`-tagged test + compares both on every fixture and on mutated inputs. Cheap and catches + parser divergences the fixed goldens miss. + +--- + +## 2. Target design + +### 2.1 Public API + +```elixir +@spec encode(iodata(), keyword()) :: {:ok, binary()} | {:error, Libwbxml.Error.reason()} +Libwbxml.encode(xml, opts \\ []) +# :version :"1.0" | :"1.1" | :"1.2" | :"1.3" default :"1.3" +# :string_table boolean default true +# :anonymous boolean (omit public ID, emit 0x01) default true (today's NIF) +# :preserve_whitespace boolean default false +# :language atom | nil — force instead of DOCTYPE/root detection; default nil + +@spec decode(binary(), keyword()) :: {:ok, String.t()} | {:error, Libwbxml.Error.reason()} +Libwbxml.decode(wbxml, opts \\ []) +# :language atom | nil default :activesync (today's NIF; nil = detect from public ID) +# :format :indent | :compact | :canonical default :indent +# :indent non_neg_integer default 0 +# :charset atom | nil used only if the document declares none; default nil (→ UTF-8) +# :preserve_whitespace boolean default false + +Libwbxml.encode!/2, Libwbxml.decode!/2 # raise Libwbxml.Error +Libwbxml.languages/0 # list of language atoms +``` + +Language atoms (mirror `WBXMLLanguage`): `:wml10 :wml11 :wml12 :wml13 :wta10 +:wtawml12 :channel11 :channel12 :si10 :sl10 :co10 :prov10 :emn10 :drmrel10 +:ota_settings :syncml10 :devinf10 :syncml11 :devinf11 :metinf11 :syncml12 +:devinf12 :metinf12 :dmddf12 :wv_csp11 :wv_csp12 :airsync :activesync :conml`. + +### 2.2 Modules (all under `lib/libwbxml/`) + +| Module | Ports | Responsibility | +|---|---|---| +| `Libwbxml` | `wbxml_conv.c`, NIF | Public API, option validation, wiring. | +| `Libwbxml.Error` | `wbxml_errors.c` | `reason()` atoms ↔ messages; exception struct. | +| `Libwbxml.Charset` | `wbxml_charset.c` | name↔MIB, `to_utf8/2`, `from_utf8/2`. | +| `Libwbxml.Base64` | `wbxml_base64.c` | thin wrapper over `Base` reproducing upstream's tolerance of whitespace/newlines inside base64 (activesync-032, ota icons). Verify C behaviour on invalid characters and match it. | +| `Libwbxml.Tables` | `wbxml_tables.h` lookup fns | `get(lang)`, `search(public_id, system_id, root_uri_local)`, `tag_from_xml/3`, `tag_from_token/3`, `attr_from_xml/3`, `attr_from_token/3`, `attr_value_*`, `ext_*`, `xmlns_for_page/2`, `page_for_xmlns/2`. Same prefix-matching semantics as C (`wbxml_tables_get_attr_from_xml` picks the longest matching value prefix; `wbxml_tables_get_tag_from_xml` prefers the current code page). | +| `Libwbxml.Tables.Generated.*` | `wbxml_tables.c` | **Generated** data modules, one per language family, each with `public_id/0`, `tags/0`, `namespaces/0`, `attrs/0`, `attr_values/0`, `ext_values/0` plus precomputed reverse maps. | +| `Libwbxml.Tree` | `wbxml_tree.h`, `wbxml_elt.h` | Structs: `Tree{lang, orig_charset, root}`, `Element{name, attrs, children}` where `name` is `{:token, entry}` or `{:literal, string}`, `Attribute{name, value}`, `Text{data}`, `CData{children}`, `PI{}`, `SubTree{tree}` (embedded DevInf/DDF). Helpers: `syncml_data_type/2`, `has_child_element?/1`. | +| `Libwbxml.Parser` | `wbxml_parser.c`, `wbxml_tree_clb_wbxml.c` | WBXML binary → `Tree`. Binary pattern matching, no mutable state; returns `{:error, reason}` on every malformed input (fuzz tests). | +| `Libwbxml.XML.Reader` | `wbxml_tree_clb_xml.c`, `wbxml_tree.c#wbxml_tree_from_xml` | XML → `Tree` via `:xmerl_sax_parser`. | +| `Libwbxml.XML.Writer` | XML half of `wbxml_encoder.c` (`xml_*` functions) | `Tree` → XML string in indent/compact/canonical modes. | +| `Libwbxml.Encoder` | WBXML half of `wbxml_encoder.c` (`wbxml_*`, `wbxml_strtbl_*`) | `Tree` → WBXML binary, incl. string-table construction, code-page switching, literals, attr-value tokenisation, extensions, opaque encodings. | + +No runtime dependencies. Dev/test deps allowed: none required; `stream_data` +optional for the fuzz test; `benchee` optional. + +### 2.3 Repository layout after the rewrite + +``` +lib/libwbxml.ex +lib/libwbxml/{error,charset,base64,tables,tree,parser,encoder}.ex +lib/libwbxml/xml/{reader,writer}.ex +lib/libwbxml/tables/generated/*.ex +test/libwbxml_test.exs, test/libwbxml_roundtrip_test.exs (existing, adjusted) +test/upstream/roundtrip_test.exs (port of launchTests.sh) +test/upstream/golden_test.exs (byte-exact vs C output) +test/upstream/api/*_test.exs (ports of test/api) +test/upstream/fuzz_test.exs +test/support/{normalize.ex,fixtures.ex} +test/fixtures/upstream//… (221 inputs + goldens + manifest) +test/fixtures/fuzz/*.fuzz +``` + +--- + +## 3. Phase 0: preparation (one agent, sequential, ~small) + +**Task 0.1 — Branch and tooling script.** +* Create branch `elixir-rewrite` (no commits without the user's approval; the + user commits). +* Add `scripts/build_upstream_tools.sh`: clones + `https://github.com/libwbxml/libwbxml` at tag `libwbxml-0.11.10` into + `_build/upstream/` (gitignored), runs `cmake -S … -B _build/upstream/build` + and `cmake --build`, prints the paths of `xml2wbxml` and `wbxml2xml`. Needs + `cmake` and expat (`brew install cmake expat`, `apt-get install cmake + libexpat1-dev`). This script is deleted in Phase 3. +* Rename the NIF module to `Libwbxml.Native` (change `ERL_NIF_INIT` in + `native/wbxml_nif.c`, move the `@on_load`/`load_nif` code into + `lib/libwbxml/native.ex`) and make `Libwbxml.encode/decode` delegate to it + for now. Existing tests must still pass. This lets Phase 2 replace + `Libwbxml` internals while `Libwbxml.Native` stays available for + differential tests until Phase 3. + +Acceptance: `mix test` green; `scripts/build_upstream_tools.sh` produces two +working binaries. + +--- + +## 4. Phase 1: reproduce the upstream test suite (tests must be green against the C reference) + +Tasks 1.1–1.5 are independent of each other after 0.1 and can run in parallel. + +**Task 1.1 — Vendor fixtures and generate goldens.** *(depends on 0.1)* +* Copy `upstream/test/tools//*.{xml,ddf}` (not `testsuite.xml`, + `launchTests.sh`, `normalize_xml.pl`) to `test/fixtures/upstream//`, + byte-for-byte. Copy the three `test/fuzz/*.fuzz` files to + `test/fixtures/fuzz/` with short names (`sigabrt-1.fuzz`, `sigsegv-1.fuzz`, + `sigsegv-2.fuzz`). +* Write `scripts/gen_goldens.exs` (Elixir script; deleted in Phase 3) that, + for every fixture `B.xml`/`B.ddf`, derives the language `L` from the DOCTYPE + (Appendix A) and runs the C tools to produce: + + | File | Command | Purpose | + |---|---|---| + | `B.wbxml` | `xml2wbxml -o` (defaults) | canonical encode: string table on, public ID on | + | `B.nostrtbl.wbxml` | `xml2wbxml -n -o` | harness configuration | + | `B.anon.wbxml` | `xml2wbxml -a -o` | today's NIF configuration | + | `B.wbxml.xml` | `wbxml2xml [-l L only for ota, airsync, *.ddf] -o` on `B.wbxml` | canonical decode (indent, delta 0) | + | `B.anon.wbxml.xml` | `wbxml2xml -l L -o` on `B.anon.wbxml` | today's NIF decode path (forced language) | + | `B.wbxml.compact.xml`, `B.wbxml.canonical.xml`, `B.wbxml.indent2.xml` | `wbxml2xml -m 0`, `-m 2`, `-i 2` | format variants; **activesync, airsync, syncml, si dirs only** to limit file count | + + Also for the two existing project fixtures in `test/fixtures/*.xml`. +* Record every tool invocation's exit status in + `test/fixtures/upstream/manifest.exs` (`%{"dir/B.xml" => %{language: :…, + wbxml: :ok | {:error, "message"}, nostrtbl: …, …}}`). Expected failures: + `drmrel/*` with `-n`. Anything else failing is a bug in the script. +* Commit nothing; leave generated files in the tree for the user to review. + +Acceptance: manifest shows only the expected drmrel `-n` failures; re-running +the script is idempotent (byte-identical output). + +**Task 1.2 — Round-trip test (port of `launchTests.sh` + `normalize_xml.pl`).** +* `test/support/normalize.ex`: faithful port of `normalize_xml.pl` (rules in + §0.3). Unit-test it against a handful of hand-written cases including the + `EXPECTED ::=` hook, self-closing expansion, comment stripping, and the + `xmlns` deletion. +* `test/upstream/roundtrip_test.exs`: for each fixture (drmrel excluded, as + upstream): `encode(xml, string_table: false)` → `decode(wbxml, language: L + or nil per the harness rules)` → normalise both → compare with whitespace + runs collapsed (`diff -b` semantics). For the three CDATA-skipped files + only assert both conversions succeed. +* Until Phase 2 lands, run the same test body through the C tools (a + `@tag :ctools` variant that shells out to the binaries from 0.1) so the + normaliser and harness port are proven correct **before** the Elixir + codec exists. Expected: 215 pass + 3 skipped, matching the C baseline. + +**Task 1.3 — Golden tests.** +`test/upstream/golden_test.exs`, driven by the manifest: for every fixture +and every variant present, `encode(xml, opts) == File.read!(golden)` and +`decode(golden_wbxml, opts) == File.read!(golden_xml)`, byte-exact. Option +mapping: `.wbxml` → `[anonymous: false]`; `.nostrtbl.wbxml` → `[anonymous: +false, string_table: false]`; `.anon.wbxml` → `[]`; decode variants → +`[language: L | nil, format: …, indent: …]`. Mark with `@tag :golden`. +Run the `.anon.wbxml` / `.anon.wbxml.xml` subset for activesync through +`Libwbxml.Native` too, to prove the NIF and the goldens agree (they do for +the one file checked; this makes it systematic). + +**Task 1.4 — API unit tests (port of `test/api`).** +One file per upstream test, same test names, under `test/upstream/api/`: +`base64_test.exs`, `charset_test.exs`, `errors_test.exs`, +`parser_internals_test.exs` (datetime opaque decoding, exposed as +`Libwbxml.Parser.decode_datetime/1`), `encoder_internals_test.exs`, +`conv_test.exs` (bad params → `{:error, :bad_parameter}` or +`ArgumentError`, pick one and document). For `buffers`, port only +`test_conversion_base64`, `test_conversion_hex`, `test_shrink_blanks`, +`test_strip_blanks`, `test_split_words` as tests of the corresponding +Elixir helpers (put the helpers in `Libwbxml.Encoder.Strings` or similar). +Write a short `test/upstream/api/README.md` listing every upstream test and +whether it was ported, adapted, or skipped and why (lists, buffer +alloc/free tests). + +**Task 1.5 — Fuzz / robustness tests.** +`test/upstream/fuzz_test.exs`: the 3 upstream fuzz inputs, `<<1,2,3,4>>`, +`<<>>`, truncated versions of every golden `.wbxml` (cut at 1, 2, 3, 5, 8, +half, len-1 bytes), and random byte-flips of goldens under a fixed seed. +Contract: `decode/2` returns `{:error, _}` or `{:ok, _}`, never raises, +within a per-case timeout. With `Libwbxml.Native` available, also assert the +Elixir and C decoders agree on ok-vs-error (`@tag :native`). + +**Task 1.6 — Existing tests.** Update `test/libwbxml_test.exs` and +`test/libwbxml_roundtrip_test.exs` to drop the `load_nif` setup and to +assert on the new return types once Phase 2 lands (keep `to_string/1` +tolerant assertions until then). + +Phase 1 exit criteria: everything is green with `Libwbxml` delegating to the +NIF for the default path and the `:ctools` variant covering the rest; +`mix test --exclude native --exclude ctools` is the command Phase 2 agents +iterate on. + +--- + +## 5. Phase 2: implementation + +Dependency graph: 2.1 and 2.2 first (parallel); then 2.3/2.4 (decode path) +and 2.5/2.6 (encode path) in parallel; then 2.7. + +**Task 2.1 — Generate the token tables.** *(independent)* +* Do **not** hand-transcribe `wbxml_tables.c`. Write `scripts/dump_tables.c` + that links against the vendored sources with the repo's + `native/wbxml_config.h` (all `WBXML_SUPPORT_*` on, + `WBXML_TABLES_SEPARATE_WML_VERSIONS` off → WML 1.0–1.2 share the 1.3 + tables, exactly as the current build), walks + `wbxml_tables_get_main()` and every per-language table until the + terminating `NULL` entry, and prints Elixir source for + `lib/libwbxml/tables/generated/*.ex` plus a `counts.exs` fixture + (`%{lang => %{tags: n, attrs: n, …}}`). +* Each generated module exposes lists in table order (order matters for + the prefix-match rules) and reverse lookup maps `%{{page, token} => entry}`. + Entries carry: tag `{name, page, token, options}` with options as a + MapSet of `:binary | :opaque | :cdata`; namespace `{uri, page}`; attr + `{name, value_prefix | nil, page, token}`; attr_value `{value, page, token}`; + ext_value `{value, token}`; public_id `{wbxml_public_id | nil, xml_public_id, + root_element, dtd}`. +* `Libwbxml.Tables` (hand-written) implements the lookup semantics of + `wbxml_tables.c` lines ~3700–3909 verbatim, including `search_table`'s + three-stage search (public ID case-insensitive → system ID exact → + namespace prefix of `uri|local` root, then root element name). +* Tests: counts match `counts.exs`; spot checks (ActiveSync `Ping` is page + 0x0D token 0x05 etc. — take five values from the C source); every + language in `Libwbxml.languages/0` resolves. Keep `dump_tables.c` until + Phase 3. + +**Task 2.2 — Foundation modules.** *(independent)* +`Libwbxml.Error`, `Libwbxml.Charset`, `Libwbxml.Base64`, `Libwbxml.Tree`, +option parsing in `Libwbxml` (but still delegating to `Native`). Must make +Task 1.4's `errors`, `charset`, `base64` tests pass. + +**Task 2.3 — WBXML parser (`Libwbxml.Parser`).** *(after 2.1, 2.2)* +Port `wbxml_parser.c` + `wbxml_tree_clb_wbxml.c` to a tree-building +recursive-descent parser over binaries. Cover: version byte (reject > 1.3 +as C does — check exact behaviour), public ID as mb_u_int32 or string-table +index (index resolved *after* the string table is read), charset mb_u_int32 +with `:charset` fallback then UTF-8, string table, PI, `SWITCH_PAGE` for tag +and attribute code spaces, `LITERAL`/`LITERAL_A`/`LITERAL_C`/`LITERAL_AC`, +`STR_I`/`STR_T`, `ENTITY` (→ UTF-8), `EXT_I/T/0-2` (WV extension values), +`OPAQUE` with language-specific decoding (`decode_opaque_content`, +`decode_opaque_attr_value`: SI/EMN datetime → ISO string, WV integer / +datetime, DRMREL, OTA icon → base64, ActiveSync/AirSync binary tags → +base64, SyncML `Data` carrying `application/vnd.syncml-devinf+wbxml` → +nested parse into a `SubTree`), attribute values split across tokens, +charset conversion of inline/table strings. Forced language overrides the +document's public ID; unknown public ID with no forced language → +`:unknown_public_id`. Every out-of-bounds read is an error, never a crash. +Acceptance: decode side of Task 1.3 goldens (with the Writer from 2.4), +Task 1.5, `parser_internals_test`. + +**Task 2.4 — XML writer (`Libwbxml.XML.Writer`).** *(after 2.1, 2.2; can be +the same agent as 2.3)* +Port the `xml_*` half of `wbxml_encoder.c`: header + DOCTYPE from the +language's public-ID entry (PUBLIC vs SYSTEM form when the XML public ID is +empty, as OTA), `xmlns` emitted when the code page changes and for the root, +text escaping (`xml_encode_text_entities`), CDATA, PI, embedded sub-trees, +`indent`/`compact`/`canonical` modes, `indent` delta, ignorable-whitespace +rules. Build output as iodata. Acceptance: all `*.xml` goldens byte-exact. + +**Task 2.5 — XML reader (`Libwbxml.XML.Reader`).** *(after 2.1, 2.2)* +Port `wbxml_tree_clb_xml.c` onto `:xmerl_sax_parser.stream/2` with +`:skip_external_dtd`, treating `characters` and `ignorableWhitespace` +identically (expat has no DTD knowledge; C decides ignorability itself). +Cover: XML declaration encoding → `orig_charset`; DOCTYPE public/system ID → +language, else root `uri|local` → language, else `:unknown_xml_language`; +element/attribute name resolution with namespace → code page; `:binary` +tags accumulate text and base64-decode it at end-element; SyncML data-type +detection (`wbxml_tree_node_get_syncml_data_type`) with the implicit CDATA +and vObject `\n`→`\r\n` hacks; embedded `syncml:devinf|DevInf` and +`syncml:dmddf1.2|MgmtTree` become `SubTree` nodes parsed with the +DevInf/DDF tables of the matching SyncML version (C re-parses raw bytes with +a synthetic DOCTYPE; the Elixir port may build the sub-tree directly from +the same event stream, which is simpler and equivalent); PIs are ignored as +in C. xmerl parse errors → `{:error, :xml_parsing_failed}`. +Acceptance: `Libwbxml.XML.Reader.read/1` on all 221 fixtures returns a tree +with the expected language (manifest) and no errors except drmrel-independent +ones; full acceptance via 2.6. + +**Task 2.6 — WBXML encoder (`Libwbxml.Encoder`).** *(after 2.1, 2.2, 2.5)* +Port the `wbxml_*` half of `wbxml_encoder.c`: header (`version`, public ID +mb_u_int32, or `0x00` + string-table index of the XML public ID when the +language has no WBXML public ID, or `0x01` when anonymous; charset `0x6A`; +string-table length + bytes), string-table construction +(`wbxml_strtbl_initialize` / `collect_strings` / `collect_words` / +`check_references` / `construct` — reproduce the exact ordering rules, +because goldens are byte-exact), tags with content/attribute bits and code +page switching, literals (require string table → `:strtbl_disabled` +otherwise), attribute start tokens with value-prefix matching and +attribute-value token substitution (`wbxml_encode_value_element_buffer`), +entities, WV extension tokens and integer/datetime opaque encoding, SI/EMN +datetime opaque, DRMREL, OTA Nokia icon, ActiveSync `:binary`/`:opaque` +tags → OPAQUE, SyncML embedded DevInf/DDF sub-tree → OPAQUE containing a +complete WBXML document, empty/blank text handling under +`preserve_whitespace`. Acceptance: all `*.wbxml` goldens byte-exact +(including `.nostrtbl` and `.anon`), Task 1.2 round-trip green. + +**Task 2.7 — Wire up, docs, differential run.** *(after 2.3–2.6)* +Switch `Libwbxml.encode/decode` to the pure implementation; keep +`Libwbxml.Native` only for `@tag :native` tests. Write `@moduledoc`/`@doc` +with the option tables from §2.1. Run the full suite including `:native` and +`:ctools`. Add a small `mix run` benchmark note (largest fixture is 12 KB; +pure Elixir must stay well under a millisecond per document — if not, profile +before Phase 3). Update `test/libwbxml_test.exs` to the final return types. + +--- + +## 6. Phase 3: remove the C toolchain (one agent, sequential) + +**Task 3.1 — Delete native code and build plumbing.** +`vendor/`, `native/`, `Makefile`, `checksum.exs`, `lib/libwbxml/native.ex`, +`scripts/build_upstream_tools.sh`, `scripts/gen_goldens.exs`, +`scripts/dump_tables.c`. Remove `:native`/`:ctools` tests and the +`Libwbxml.Native` references. Keep the generated tables and all fixtures. + +**Task 3.2 — `mix.exs`.** Remove `compilers: [:elixir_make]`, `make_*` +keys, the `elixir_make` and `cc_precompiler` deps; run `mix deps.unlock +--unused`; package `files` → `lib`, `mix.exs`, `README.md`, `LICENSE*`, +`CHANGELOG.md`; version `0.2.0`; `licenses` per decision 6; `elixir: "~> 1.19"` +stays (no `elixirc_paths` needed). Add `docs` config for `ex_doc` (dev only). + +**Task 3.3 — CI and release.** `ci.yml`: drop the apt-get expat step and +`LIBWBXML_FORCE_BUILD`; keep `mix test --warnings-as-errors` and `mix +format --check-formatted`; add `mix compile --warnings-as-errors`. Delete +`release.yml` (no precompiled artifacts any more) or reduce it to `mix +hex.build` on tags if the user wants — leave a note, don't invent a Hex +publish flow. + +**Task 3.4 — Docs.** Rewrite `README.md` (no mention of NIF, elixir_make, +expat, checksum, force-build, precompiled downloads; new options; language +list; licence statement; upstream attribution and pinned tag the tables and +fixtures came from). Add `CHANGELOG.md` with the 0.2.0 breaking changes +(decode returns binary; error atoms). `.gitignore`: drop `wbxml_nif-*.tar`. +`vendor/libwbxml/VENDORED_VERSION` goes away; record the upstream commit in +the README and in a header comment of the generated tables. + +Exit criteria: `mix test` passes on a machine with **no** C compiler, cmake +or expat; `mix hex.build` succeeds; `git grep -i "nif\|elixir_make\|expat\|vendor/"` is empty outside `CHANGELOG.md`. + +--- + +## 7. Hand-off notes for every sub-agent + +* Never commit or push. Never touch GitHub. Leave changes in the working tree. +* Work on branch `elixir-rewrite`. Run `mix format` before finishing. +* The C reference lives in `vendor/libwbxml/src/` until Phase 3; the upstream + tests and tools are **not** vendored — use `scripts/build_upstream_tools.sh` + (Task 0.1) or clone `https://github.com/libwbxml/libwbxml` at tag + `libwbxml-0.11.10`. +* Byte-exactness is the bar for goldens. When Elixir output differs from a + golden, the C behaviour wins unless it is a demonstrable C bug, in which + case: keep C's behaviour, add a `# NOTE(upstream-quirk):` comment, and list + it in the task report. +* Do not add runtime dependencies. XML parsing is `:xmerl_sax_parser`. +* Tests to iterate on: `mix test --exclude native --exclude ctools`. + Full run: `mix test --include native --include ctools`. +* Each task report must list: files touched, tests added, test counts + (pass/skip/fail), any upstream quirks reproduced, anything deferred. + +--- + +## Appendix A — Language detection table for fixtures and goldens + +| XML public ID (case-insensitive) | language atom | `wbxml2xml -l` | +|---|---|---| +| `-//MICROSOFT//DTD ActiveSync//EN` | `:activesync` | `ACTIVESYNC` | +| `-//AIRSYNC//DTD AirSync//EN` | `:airsync` | `AIRSYNC` | +| `-//CONML//DTD ConML//EN` | `:conml` | `CONML` | +| `-//OMA//DTD-DM-DDF 1.2//EN` | `:dmddf12` | `DMDDF12` | +| `-//OMA//DTD DRMREL 1.0//EN` | `:drmrel10` | `DRMREL10` | +| `-//WAPFORUM//DTD EMN 1.0//EN` | `:emn10` | `EMN10` | +| (none; `SYSTEM "characteristic-list.dtd"`) | `:ota_settings` | `OTA` | +| `-//WAPFORUM//DTD PROV 1.0//EN` | `:prov10` | `PROV10` | +| `-//WAPFORUM//DTD SI 1.0//EN` | `:si10` | `SI10` | +| `-//WAPFORUM//DTD SL 1.0//EN` | `:sl10` | `SL10` | +| `-//SYNCML//DTD SyncML 1.1//EN` | `:syncml11` | `SYNCML11` | +| `-//SYNCML//DTD DevInf 1.1//EN` | `:devinf11` | `DEVINF11` | +| `-//SYNCML//DTD SyncML 1.2//EN` | `:syncml12` | `SYNCML12` | +| `-//OMA//DTD WV-CSP 1.1//EN` | `:wv_csp11` | `CSP11` | + +The full 29-entry list (with WBXML public IDs, root elements and DTD URLs) +is in `vendor/libwbxml/src/wbxml_tables.c` lines 55–127 and +`wbxml_tables.h` lines 53–134; the generator in Task 2.1 emits it. + +## Appendix B — Error atoms (from `wbxml_errors.h`) + +`:attr_table_undefined :bad_datetime :bad_parameter :internal +:lang_table_undefined :not_enough_memory :not_implemented +:tag_table_undefined :b64_enc :b64_dec :wv_datetime_format +:no_charset_conv :charset_str_len :charset_unknown :charset_conv_init +:charset_conv :charset_not_found :attr_value_table_undefined +:bad_literal_index :bad_null_terminated_string_in_string_table +:bad_opaque_length :empty_wbxml :end_of_buffer :entity_code_overflow +:ext_value_table_undefined :invalid_strtbl_index +:literal_not_null_terminated_in_string_table +:not_null_terminated_inline_string :null_parser :null_string_table +:string_expected :strtbl_length :unknown_attr :unknown_attr_value +:unknown_extension_token :unknown_extension_value :unknown_public_id +:unknown_tag :unvalid_mbuint32 :wv_integer_overflow :encoder_append_data +:strtbl_disabled :unknown_xml_language :xml_node_not_allowed +:xml_null_attr_name :xml_parsing_failed :xml_devinf_conv_failed +:no_xmlparser :xmlparser_output_utf16 :invalid_unicode` + +Messages come from `wbxml_errors.c` (copy verbatim; `errors_test` checks +that none is "Unknown Error Code" and that the datetime message has no `%`). + +## Appendix C — Golden file naming (Task 1.1) + +``` +test/fixtures/upstream//.xml input (verbatim upstream) +test/fixtures/upstream//.wbxml xml2wbxml (defaults) +test/fixtures/upstream//.nostrtbl.wbxml xml2wbxml -n +test/fixtures/upstream//.anon.wbxml xml2wbxml -a +test/fixtures/upstream//.wbxml.xml wbxml2xml [-l L] .wbxml +test/fixtures/upstream//.anon.wbxml.xml wbxml2xml -l L .anon.wbxml +test/fixtures/upstream//.wbxml.compact.xml wbxml2xml -m 0 (subset of dirs) +test/fixtures/upstream//.wbxml.canonical.xml wbxml2xml -m 2 (subset) +test/fixtures/upstream//.wbxml.indent2.xml wbxml2xml -i 2 (subset) +test/fixtures/upstream/manifest.exs language + tool results per fixture +``` diff --git a/checksum.exs b/checksum.exs deleted file mode 100644 index d740492..0000000 --- a/checksum.exs +++ /dev/null @@ -1,5 +0,0 @@ -%{ - "libwbxml-nif-2.17-aarch64-apple-darwin-0.1.0.tar.gz" => "sha256:72fd4a1b4ae273040425cbf89a4cb767ece056cde47f43f0d3afebd8e81765d2", - "libwbxml-nif-2.17-x86_64-apple-darwin-0.1.0.tar.gz" => "sha256:1b451d56188807030fec9d4706067cdde367f44231e43061090c1aed082a58b2", - "libwbxml-nif-2.17-x86_64-linux-gnu-0.1.0.tar.gz" => "sha256:c72699175dc9b9ef22d97125328c68c5cfecebd224d3ac7555e8d3167580e627", -} diff --git a/lib/libwbxml.ex b/lib/libwbxml.ex index 67714da..efc1296 100644 --- a/lib/libwbxml.ex +++ b/lib/libwbxml.ex @@ -1,72 +1,359 @@ defmodule Libwbxml do @moduledoc """ - Thin Elixir wrapper around the native **libwbxml** implementation. All - heavy lifting happens in the `wbxml_nif` shared library which is compiled - automatically by the project's `Makefile` via - [`elixir_make`](https://hex.pm/packages/elixir_make) when the dependency is - first built. At runtime we only need to - locate that `.so`/`.dylib` and load it. - - When the NIF is built as part of the Mix compilation process it is placed - inside the priv directory of the `:libwbxml` OTP application, so the default - lookup via `:code.priv_dir/1` is sufficient. An explicit path can still be - injected at runtime by setting `config :libwbxml, :libwbxml_dir, "..."` - this - is mainly useful for testing pre-compiled artefacts. + WBXML encoder/decoder. + + Converts XML documents to WBXML (`encode/2`) and WBXML documents to XML + (`decode/2`) for the 29 WBXML languages supported by libwbxml 0.11.10 + (`languages/0`), ActiveSync being the primary target. + + Pure Elixir, no native code: `encode/2` is `Libwbxml.XML.Reader` (XML → + tree) followed by `Libwbxml.Encoder` (tree → WBXML); `decode/2` is + `Libwbxml.Parser` (WBXML → tree) followed by `Libwbxml.XML.Writer` + (tree → XML). All four take the validated option map built here. + + ## Return values + + Both functions return `{:ok, result}` or `{:error, reason}` where `reason` + is one of the atoms in `t:Libwbxml.Error.reason/0`; + `Libwbxml.Error.message/1` gives upstream's description. The bang variants + raise `Libwbxml.Error`. Invalid arguments and options raise + `ArgumentError`. """ - @on_load :load_nif + alias Libwbxml.Error - # --------------------------------------------------------------------------- - # NIF loading helpers - # --------------------------------------------------------------------------- + # WBXMLLanguage enum order (wbxml_conv.h). METINF10 exists in the enum but + # has no table entry upstream, so it is not a supported language. + @languages [ + :wml10, + :wml11, + :wml12, + :wml13, + :wta10, + :wtawml12, + :channel11, + :channel12, + :si10, + :sl10, + :co10, + :prov10, + :emn10, + :drmrel10, + :ota_settings, + :syncml10, + :devinf10, + :syncml11, + :devinf11, + :metinf11, + :syncml12, + :devinf12, + :metinf12, + :dmddf12, + :wv_csp11, + :wv_csp12, + :airsync, + :activesync, + :conml + ] - # Returns the directory that holds `wbxml_nif.so`. Preference order: - # 1. Explicit path persisted by the compiler in the application environment - # (`config :libwbxml, :libwbxml_dir`). - # 2. The priv directory that ships with the `:libwbxml` OTP application. - @spec priv_dir() :: String.t() - defp priv_dir do - case Application.get_env(:libwbxml, :libwbxml_dir) do - nil -> - case :code.priv_dir(:libwbxml) do - dir when is_list(dir) -> - to_string(dir) + @versions [:"1.0", :"1.1", :"1.2", :"1.3"] + @formats [:indent, :compact, :canonical] + + @encode_defaults %{ + version: :"1.3", + string_table: true, + anonymous: true, + preserve_whitespace: false, + language: nil + } + + @decode_defaults %{ + language: :activesync, + format: :indent, + indent: 0, + charset: nil, + preserve_whitespace: false + } + + @typedoc "A WBXML language, see `languages/0`." + @type language :: + :wml10 + | :wml11 + | :wml12 + | :wml13 + | :wta10 + | :wtawml12 + | :channel11 + | :channel12 + | :si10 + | :sl10 + | :co10 + | :prov10 + | :emn10 + | :drmrel10 + | :ota_settings + | :syncml10 + | :devinf10 + | :syncml11 + | :devinf11 + | :metinf11 + | :syncml12 + | :devinf12 + | :metinf12 + | :dmddf12 + | :wv_csp11 + | :wv_csp12 + | :airsync + | :activesync + | :conml + + @type version :: :"1.0" | :"1.1" | :"1.2" | :"1.3" + @type format :: :indent | :compact | :canonical + + @type encode_option :: + {:version, version()} + | {:string_table, boolean()} + | {:anonymous, boolean()} + | {:preserve_whitespace, boolean()} + | {:language, language() | nil} + + @type decode_option :: + {:language, language() | nil} + | {:format, format()} + | {:indent, non_neg_integer()} + | {:charset, String.t() | atom() | non_neg_integer() | nil} + | {:preserve_whitespace, boolean()} + + @doc """ + The supported WBXML languages, in upstream `WBXMLLanguage` order. + """ + @spec languages() :: [language()] + def languages, do: @languages + + @doc """ + Encodes an XML document (a string or any iodata) as WBXML. + + The language is detected from the DOCTYPE public/system identifier, or + from the root element and its namespace, unless `:language` forces one. + + ## Options + + | Option | Values | Default | Meaning | + |------------------------|-----------------------------------------|----------|---------| + | `:version` | `:"1.0"`, `:"1.1"`, `:"1.2"`, `:"1.3"` | `:"1.3"` | WBXML version byte of the output. | + | `:string_table` | boolean | `true` | Build a string table; required to encode names that have no token (literals). | + | `:anonymous` | boolean | `true` | Omit the public ID and write `0x01` ("unknown") instead. | + | `:preserve_whitespace` | boolean | `false` | Keep whitespace-only text nodes instead of dropping them. | + | `:language` | one of `languages/0`, or `nil` | `nil` | Force the language instead of detecting it. | + + The defaults reproduce what this library has always produced + (`xml2wbxml -a`). + + ## Examples - {:error, :bad_name} -> - raise "Unable to locate priv directory for :libwbxml - did the native compiler run?" - end + iex> {:ok, wbxml} = Libwbxml.encode(~s(1)) + iex> binary_part(wbxml, 0, 3) + <<0x03, 0x01, 0x6A>> - path when is_binary(path) -> - path + iex> Libwbxml.encode("not xml") + {:error, :xml_parsing_failed} + """ + @spec encode(iodata(), [encode_option()]) :: {:ok, binary()} | {:error, Error.reason()} + def encode(xml, opts \\ []) do + xml = iodata_to_binary!(xml, "xml") + opts = validate_encode_opts!(opts) + + with {:ok, tree} <- Libwbxml.XML.Reader.read(xml, opts) do + Libwbxml.Encoder.encode(tree, opts) end end - @spec load_nif() :: :ok | {:error, {atom(), String.t()}} - def load_nif do - nif_path = Path.join(priv_dir(), "wbxml_nif") - :erlang.load_nif(String.to_charlist(nif_path), 0) + @doc """ + Same as `encode/2` but returns the WBXML binary or raises `Libwbxml.Error`. + """ + @spec encode!(iodata(), [encode_option()]) :: binary() + def encode!(xml, opts \\ []) do + case encode(xml, opts) do + {:ok, wbxml} -> wbxml + {:error, reason} -> raise Error, reason: reason + end end - # --------------------------------------------------------------------------- - # Public API - these are substituted by the NIF at load time - # --------------------------------------------------------------------------- - @doc """ - Decode a WBXML-encoded `binary` into a regular XML `String`. + Decodes a WBXML binary into an XML document (a UTF-8 string). + + ## Options + + | Option | Values | Default | Meaning | + |------------------------|------------------------------------------|---------------|---------| + | `:language` | one of `languages/0`, or `nil` | `:activesync` | Language to decode with. `nil` detects it from the document's public ID (ActiveSync documents carry none, hence the default). | + | `:format` | `:indent`, `:compact`, `:canonical` | `:indent` | XML generation style: one element per line, everything on one line, or canonical XML. | + | `:indent` | non-negative integer | `0` | Spaces per nesting level in `:indent` format. | + | `:charset` | charset name (`"UTF-8"`, `:"ISO-8859-1"`), IANA MIBenum, or `nil` | `nil` | Charset to assume when the document does not declare one (`nil` means UTF-8). | + | `:preserve_whitespace` | boolean | `false` | Keep whitespace-only text nodes instead of dropping them. | + + The defaults reproduce what this library has always produced + (`wbxml2xml -l ACTIVESYNC`): an XML declaration, an ActiveSync DOCTYPE and + one element per line with no indentation. + + ## Examples - Returns `{:ok, xml}` on success or `{:error, reason}` when decoding fails. + iex> {:ok, xml} = Libwbxml.decode(<<0x03, 0x01, 0x6A, 0x00, 0x00, 0x0D, 0x45, 0x00, 0x00, 0x4E, 0x03, ?1, 0x00, 0x01, 0x01>>) + iex> xml =~ "1" + true - This function is executed in native code (NIF). If the shared library - wasn't loaded for some reason you'll get `:nif_not_loaded`. + iex> Libwbxml.decode(<<1, 2, 3, 4>>) + {:error, :strtbl_length} """ - @spec decode(binary()) :: {:ok, String.t()} | {:error, term()} - def decode(_wbxml), do: :erlang.nif_error(:nif_not_loaded) + @spec decode(binary(), [decode_option()]) :: {:ok, String.t()} | {:error, Error.reason()} + def decode(wbxml, opts \\ []) do + unless is_binary(wbxml) do + raise ArgumentError, "expected wbxml to be a binary, got: #{inspect(wbxml)}" + end - @doc """ - Encode an XML `String` (or any iodata) into WBXML format. + opts = validate_decode_opts!(opts) + + with {:ok, tree} <- Libwbxml.Parser.parse(wbxml, opts) do + Libwbxml.XML.Writer.write(tree, opts) + end + end - Returns `{:ok, wbxml_binary}` on success or `{:error, reason}`. + @doc """ + Same as `decode/2` but returns the XML string or raises `Libwbxml.Error`. """ - @spec encode(String.t() | iodata()) :: {:ok, binary()} | {:error, term()} - def encode(_xml), do: :erlang.nif_error(:nif_not_loaded) + @spec decode!(binary(), [decode_option()]) :: String.t() + def decode!(wbxml, opts \\ []) do + case decode(wbxml, opts) do + {:ok, xml} -> xml + {:error, reason} -> raise Error, reason: reason + end + end + + # -- Argument and option validation ----------------------------------------- + + defp iodata_to_binary!(data, name) do + IO.iodata_to_binary(data) + rescue + ArgumentError -> + reraise ArgumentError, + "expected #{name} to be a string or iodata, got: #{inspect(data)}", + __STACKTRACE__ + end + + defp validate_encode_opts!(opts) do + opts = validate_keys!(opts, Map.keys(@encode_defaults)) + + %{ + version: validate_one_of!(opts, :version, @versions, @encode_defaults.version), + string_table: validate_boolean!(opts, :string_table, @encode_defaults.string_table), + anonymous: validate_boolean!(opts, :anonymous, @encode_defaults.anonymous), + preserve_whitespace: + validate_boolean!(opts, :preserve_whitespace, @encode_defaults.preserve_whitespace), + language: validate_language!(opts, @encode_defaults.language) + } + end + + defp validate_decode_opts!(opts) do + opts = validate_keys!(opts, Map.keys(@decode_defaults)) + + %{ + language: validate_language!(opts, @decode_defaults.language), + format: validate_one_of!(opts, :format, @formats, @decode_defaults.format), + indent: validate_indent!(opts), + charset: validate_charset!(opts), + preserve_whitespace: + validate_boolean!(opts, :preserve_whitespace, @decode_defaults.preserve_whitespace) + } + end + + defp validate_keys!(opts, allowed) do + unless Keyword.keyword?(opts) do + raise ArgumentError, "expected options to be a keyword list, got: #{inspect(opts)}" + end + + case Keyword.keys(opts) -- allowed do + [] -> + opts + + unknown -> + raise ArgumentError, + "unknown option(s) #{inspect(unknown)}; supported options are #{inspect(allowed)}" + end + end + + defp validate_one_of!(opts, key, allowed, default) do + value = Keyword.get(opts, key, default) + + if value in allowed do + value + else + raise ArgumentError, + "invalid value for option #{inspect(key)}: #{inspect(value)}; expected one of #{inspect(allowed)}" + end + end + + defp validate_boolean!(opts, key, default) do + case Keyword.get(opts, key, default) do + value when is_boolean(value) -> + value + + value -> + raise ArgumentError, + "invalid value for option #{inspect(key)}: #{inspect(value)}; expected a boolean" + end + end + + defp validate_language!(opts, default) do + case Keyword.get(opts, :language, default) do + nil -> + nil + + language when language in @languages -> + language + + value -> + raise ArgumentError, + "invalid value for option :language: #{inspect(value)}; expected nil or one of Libwbxml.languages/0" + end + end + + defp validate_indent!(opts) do + case Keyword.get(opts, :indent, @decode_defaults.indent) do + indent when is_integer(indent) and indent >= 0 -> + indent + + value -> + raise ArgumentError, + "invalid value for option :indent: #{inspect(value)}; expected a non-negative integer" + end + end + + # Normalises the charset to its MIBenum, or nil. + defp validate_charset!(opts) do + value = Keyword.get(opts, :charset, @decode_defaults.charset) + + result = + case value do + nil -> + {:ok, nil} + + mib when is_integer(mib) -> + with {:ok, _name} <- Libwbxml.Charset.name(mib), do: {:ok, mib} + + name when is_binary(name) or is_atom(name) -> + name |> to_string() |> String.replace("_", "-") |> Libwbxml.Charset.from_name() + + _other -> + :error + end + + case result do + {:ok, mib} -> + mib + + :error -> + raise ArgumentError, + "invalid value for option :charset: #{inspect(value)}; expected nil, a charset name such as \"UTF-8\" or an IANA MIBenum" + end + end end diff --git a/lib/libwbxml/base64.ex b/lib/libwbxml/base64.ex new file mode 100644 index 0000000..7d1fa3d --- /dev/null +++ b/lib/libwbxml/base64.ex @@ -0,0 +1,110 @@ +defmodule Libwbxml.Base64 do + @moduledoc """ + Base64 with upstream libwbxml's exact tolerance rules. + + Port of `wbxml_base64.c` (an APR derivative) and of the + `wbxml_buffer_{encode,decode}_base64` wrappers in `wbxml_buffers.c` + (libwbxml 0.11.10). + + ## Encoding + + `encode/1` is standard base64 (RFC 4648 alphabet, `=` padding, no line + breaks), identical to `Base.encode64/1`. Upstream's `wbxml_base64_encode` + returns `NULL` for empty input, which `wbxml_buffer_encode_base64` (the + entry point the XML writer uses for binary/opaque content) reports as + `WBXML_ERROR_B64_ENC`; `encode/1` returns `""` for empty input and leaves + that error to the caller. + + ## Decoding + + Upstream's decoder is deliberately lax. `wbxml_base64_decode` takes the + longest prefix of the input made only of alphabet characters + (`A-Z a-z 0-9 + /`) and decodes that, ignoring everything from the first + other byte onwards: `=` padding, whitespace, garbage, or a second base64 + block. Within the prefix: + + * complete 4-character groups decode to 3 bytes; + * a trailing group of 2 or 3 characters decodes to 1 or 2 bytes (missing + padding is fine) and the leftover low bits are ignored, not validated; + * a trailing single character is ignored; + * the URL-safe alphabet (`-` `_`) is *not* accepted. + + Two entry points exist upstream and both are exposed: + + * `decode/1` mirrors `wbxml_buffer_decode_base64`, used by the XML reader + for binary tags (ActiveSync / AirSync base64 content, OTA icons): it first + strips every blank byte (space, `\\t`, `\\n`, `\\v`, `\\f`, `\\r`) so + base64 spread over indented lines decodes as a whole, then decodes as + above and fails with `{:error, :b64_dec}` only if that yields **zero** + bytes (empty input, or nothing decodable before the first invalid byte). + * `decode_raw/1` mirrors `wbxml_base64_decode(buf, -1, …)`, used by the + encoder for DRMREL `ds:KeyValue` and OTA Nokia icons: no blank stripping + (so whitespace terminates the prefix) and it never fails — an + undecodable input yields `""`. + + Examples: + + iex> Libwbxml.Base64.decode("dGVz\\n dA==") + {:ok, "test"} + iex> Libwbxml.Base64.decode("dGVzd") + {:ok, "tes"} + iex> Libwbxml.Base64.decode("d") + {:error, :b64_dec} + iex> Libwbxml.Base64.decode_raw("dGVz dA==") + "tes" + """ + + alias Libwbxml.Encoder.Strings + + @doc """ + Encodes `binary` as base64 (`wbxml_base64_encode`). Returns `""` for empty + input; see the module documentation. + + iex> Libwbxml.Base64.encode("test") + "dGVzdA==" + """ + @spec encode(binary()) :: binary() + def encode(binary) when is_binary(binary), do: Base.encode64(binary) + + @doc """ + Decodes base64 the way `wbxml_buffer_decode_base64` does: blank bytes are + removed first, then the longest alphabet prefix is decoded. Fails with + `{:error, :b64_dec}` when nothing decodes. + """ + @spec decode(binary()) :: {:ok, binary()} | {:error, :b64_dec} + def decode(binary) when is_binary(binary) do + case binary |> Strings.remove_blanks() |> decode_raw() do + <<>> -> {:error, :b64_dec} + bytes -> {:ok, bytes} + end + end + + @doc """ + Decodes the longest alphabet-only prefix of `binary` exactly as + `wbxml_base64_decode` does, without stripping blanks and without failing. + """ + @spec decode_raw(binary()) :: binary() + def decode_raw(binary) when is_binary(binary) do + bits = sextets(binary, <<>>) + bytes = div(bit_size(bits), 8) + <> = bits + decoded + end + + # Accumulate 6-bit values until the first byte outside the alphabet. + defp sextets(<>, acc) do + case sextet(byte) do + nil -> acc + value -> sextets(rest, <>) + end + end + + defp sextets(<<>>, acc), do: acc + + defp sextet(byte) when byte in ?A..?Z, do: byte - ?A + defp sextet(byte) when byte in ?a..?z, do: byte - ?a + 26 + defp sextet(byte) when byte in ?0..?9, do: byte - ?0 + 52 + defp sextet(?+), do: 62 + defp sextet(?/), do: 63 + defp sextet(_byte), do: nil +end diff --git a/lib/libwbxml/charset.ex b/lib/libwbxml/charset.ex new file mode 100644 index 0000000..207ecce --- /dev/null +++ b/lib/libwbxml/charset.ex @@ -0,0 +1,226 @@ +defmodule Libwbxml.Charset do + @moduledoc """ + Character-set names, IANA MIBenum values and conversions to/from UTF-8. + + Port of upstream `wbxml_charset.c` / `WBXMLCharsetMIBEnum` (libwbxml + 0.11.10). WBXML documents identify their charset by MIBenum; this module + keeps the same 15-entry name table as upstream. + + ## Conversions + + Upstream is compiled **without** iconv in this project, so + `wbxml_charset_conv` only has a fast path: when both sides are US-ASCII or + UTF-8 the bytes are passed through untouched (no validation — US-ASCII + input with bytes >= 0x80 is not rejected), and every other charset fails + with `WBXML_ERROR_NO_CHARSET_CONV`. + + This port keeps that pass-through and, as planned in the rewrite, adds the + conversions that OTP's `:unicode` module provides for free: + + | MIBenum | Name | `to_utf8/2` / `from_utf8/2` | + |--------:|-------------------|-------------------------------------------------------| + | 3 | US-ASCII | pass-through (bytes are not validated) | + | 106 | UTF-8 | pass-through (bytes are not validated) | + | 4 | ISO-8859-1 | `:unicode` latin1 <-> utf8 | + | 1015 | UTF-16 | big-endian; a leading BOM selects the byte order on input and is dropped; output is big-endian without BOM | + | 1000 | ISO-10646-UCS-2 | as UTF-16 big-endian (UCS-2 is a subset) | + | others | | `{:error, :no_charset_conv}` | + + A conversion that cannot represent the input (e.g. UTF-8 → ISO-8859-1 with + a character above U+00FF, or malformed UTF-16) returns + `{:error, :charset_conv}`. + """ + + @entries [ + {"US-ASCII", 3}, + {"ISO-8859-1", 4}, + {"ISO-8859-2", 5}, + {"ISO-8859-3", 6}, + {"ISO-8859-4", 7}, + {"ISO-8859-5", 8}, + {"ISO-8859-6", 9}, + {"ISO-8859-7", 10}, + {"ISO-8859-8", 11}, + {"ISO-8859-9", 12}, + {"Shift_JIS", 17}, + {"UTF-8", 106}, + {"ISO-10646-UCS-2", 1000}, + {"UTF-16", 1015}, + {"Big5", 2026} + ] + + @us_ascii 3 + @iso_8859_1 4 + @utf_8 106 + @ucs_2 1000 + @utf_16 1015 + + @typedoc "An IANA MIBenum charset identifier (`WBXMLCharsetMIBEnum`)." + @type mib :: non_neg_integer() + + @doc "MIBenum of the unknown/unspecified charset (`WBXML_CHARSET_UNKNOWN`)." + @spec unknown() :: mib() + def unknown, do: 0 + + @doc "MIBenum of US-ASCII." + @spec us_ascii() :: mib() + def us_ascii, do: @us_ascii + + @doc "MIBenum of ISO-8859-1." + @spec iso_8859_1() :: mib() + def iso_8859_1, do: @iso_8859_1 + + @doc "MIBenum of UTF-8 (the WBXML default, 0x6A)." + @spec utf_8() :: mib() + def utf_8, do: @utf_8 + + @doc "MIBenum of ISO-10646-UCS-2." + @spec ucs_2() :: mib() + def ucs_2, do: @ucs_2 + + @doc "MIBenum of UTF-16." + @spec utf_16() :: mib() + def utf_16, do: @utf_16 + + @doc """ + The `{name, mib}` table, in upstream order. + """ + @spec entries() :: [{String.t(), mib()}] + def entries, do: @entries + + @doc """ + Looks a charset up by name, case-insensitively (`wbxml_charset_get_mib`). + + iex> Libwbxml.Charset.from_name("utf-8") + {:ok, 106} + iex> Libwbxml.Charset.from_name("KOI8-R") + :error + """ + @spec from_name(String.t()) :: {:ok, mib()} | :error + def from_name(name) when is_binary(name) do + down = String.downcase(name) + + case Enum.find(@entries, fn {n, _mib} -> String.downcase(n) == down end) do + {_name, mib} -> {:ok, mib} + nil -> :error + end + end + + @doc """ + Returns the canonical name of a MIBenum (`wbxml_charset_get_name`). + + iex> Libwbxml.Charset.name(1015) + {:ok, "UTF-16"} + iex> Libwbxml.Charset.name(42) + :error + """ + @spec name(mib()) :: {:ok, String.t()} | :error + def name(mib) when is_integer(mib) do + case List.keyfind(@entries, mib, 1) do + {name, _mib} -> {:ok, name} + nil -> :error + end + end + + @doc """ + Converts `binary` from the charset `mib` to UTF-8. + + See the module documentation for the supported charsets. US-ASCII and UTF-8 + input is returned unchanged, without validation, exactly like upstream's + no-iconv build. + """ + @spec to_utf8(binary(), mib()) :: {:ok, binary()} | {:error, Libwbxml.Error.reason()} + def to_utf8(binary, mib) when is_binary(binary) and is_integer(mib) do + case mib do + m when m in [@us_ascii, @utf_8] -> {:ok, binary} + @iso_8859_1 -> convert(binary, :latin1, :utf8) + @utf_16 -> utf16_to_utf8(binary) + @ucs_2 -> convert(binary, {:utf16, :big}, :utf8) + _other -> {:error, :no_charset_conv} + end + end + + @doc """ + Converts UTF-8 `binary` to the charset `mib`. + + The inverse of `to_utf8/2`. UTF-16 and UCS-2 output is big-endian without a + byte-order mark. + """ + @spec from_utf8(binary(), mib()) :: {:ok, binary()} | {:error, Libwbxml.Error.reason()} + def from_utf8(binary, mib) when is_binary(binary) and is_integer(mib) do + case mib do + m when m in [@us_ascii, @utf_8] -> {:ok, binary} + @iso_8859_1 -> convert(binary, :utf8, :latin1) + m when m in [@utf_16, @ucs_2] -> convert(binary, :utf8, {:utf16, :big}) + _other -> {:error, :no_charset_conv} + end + end + + @doc """ + Number of bytes in the NUL terminator of strings in charset `mib`: 2 for + UTF-16 and UCS-2, 1 for everything else (as in `wbxml_charset_conv_term`). + """ + @spec terminator_size(mib()) :: 1 | 2 + def terminator_size(mib) when mib in [@utf_16, @ucs_2], do: 2 + def terminator_size(_mib), do: 1 + + @doc """ + Splits a NUL-terminated string in charset `mib` off the front of `binary`. + + Port of the length-finding half of `wbxml_charset_conv_term`: for UTF-16 and + UCS-2 the terminator is a `<<0, 0>>` pair aligned on a 2-byte boundary; for + every other charset it is a single `0` byte. Returns + `{:ok, string_bytes, rest}` where `string_bytes` excludes the terminator and + `rest` is everything after it, or `{:error, :charset_str_len}` when no + terminator is found within `binary` (upstream reads past the buffer with + `strlen` and then reports `WBXML_ERROR_CHARSET_STR_LEN`). + + The returned bytes are still in charset `mib`; pass them to `to_utf8/2`. + + iex> Libwbxml.Charset.split_terminated(<<"ab", 0, "rest">>, 106) + {:ok, "ab", "rest"} + iex> Libwbxml.Charset.split_terminated(<<0, ?a, 0, 0, 1>>, 1015) + {:ok, <<0, ?a>>, <<1>>} + iex> Libwbxml.Charset.split_terminated(<>, 1015) + {:error, :charset_str_len} + """ + @spec split_terminated(binary(), mib()) :: + {:ok, binary(), binary()} | {:error, :charset_str_len} + def split_terminated(binary, mib) when is_binary(binary) and is_integer(mib) do + case terminator_size(mib) do + 2 -> split_null_block(binary, 0) + 1 -> split_null_byte(binary) + end + end + + defp split_null_byte(binary) do + case :binary.match(binary, <<0>>) do + {pos, 1} -> + <> = binary + {:ok, string, rest} + + :nomatch -> + {:error, :charset_str_len} + end + end + + # search_null_block(): scan 2-byte blocks from the start. + defp split_null_block(binary, pos) do + case binary do + <> -> {:ok, string, rest} + <<_::binary-size(^pos), _, _, _::binary>> -> split_null_block(binary, pos + 2) + _short -> {:error, :charset_str_len} + end + end + + defp utf16_to_utf8(<<0xFE, 0xFF, rest::binary>>), do: convert(rest, {:utf16, :big}, :utf8) + defp utf16_to_utf8(<<0xFF, 0xFE, rest::binary>>), do: convert(rest, {:utf16, :little}, :utf8) + defp utf16_to_utf8(binary), do: convert(binary, {:utf16, :big}, :utf8) + + defp convert(binary, from, to) do + case :unicode.characters_to_binary(binary, from, to) do + result when is_binary(result) -> {:ok, result} + _error_or_incomplete -> {:error, :charset_conv} + end + end +end diff --git a/lib/libwbxml/encoder.ex b/lib/libwbxml/encoder.ex new file mode 100644 index 0000000..fb39d5e --- /dev/null +++ b/lib/libwbxml/encoder.ex @@ -0,0 +1,754 @@ +defmodule Libwbxml.Encoder do + @moduledoc """ + `Libwbxml.Tree` → WBXML binary, the second half of `Libwbxml.encode/2`. + + Port of the WBXML output half of upstream `wbxml_encoder.c` (libwbxml + 0.11.10): `wbxml_encoder_encode_tree_to_wbxml`, the `wbxml_encode_*` + functions and the `wbxml_strtbl_*` string-table construction. Output is + byte-identical to `xml2wbxml`, including the behaviours listed under + *Reproduced upstream quirks*. + + ## Options (the map built by `Libwbxml.encode/2`) + + * `:version` — the version byte (`:"1.3"` → `0x03`). + * `:string_table` — build a string table (`wbxml_encoder_set_use_strtbl`). + Wireless-Village and OTA Settings documents never get one, whatever the + option says. Names without a token (literals) need the table: + `{:error, :strtbl_disabled}` without it. + * `:anonymous` — `xml2wbxml -a`: only affects languages **without** a + WBXML public ID (ActiveSync, AirSync, …), whose XML public ID is then + left out of the string table and `0x01` is written instead of the + table reference. Languages with a public ID always write it. + * `:preserve_whitespace` — `xml2wbxml -k`. By default whitespace-only text + nodes are dropped and other text is stripped of leading/trailing blanks. + + ## Document layout + + Header: version, then either the WBXML public ID (mb_u_int32) or `0x00` + plus the string-table index of the XML public ID, charset `0x6A` (UTF-8, + always, as upstream), string-table length and bytes. Body: tags with the + content/attribute bits and `SWITCH_PAGE` between code pages; `LITERAL*` + for unknown names; attribute starts with value-prefix matching and + attribute-value tokens inside values; `STR_I`/`STR_T` text; `EXT_T_0` + Wireless-Village tokens; `OPAQUE` for binary tags, CDATA sections, + embedded DevInf/DDF documents (a complete nested WBXML document) and the + language-specific opaques of `Libwbxml.Opaque` (SI/EMN datetimes, WV + integers and datetimes), DRMREL `ds:KeyValue` and OTA Nokia icons. + + ## String table + + `wbxml_strtbl_initialize`: text nodes (not whitespace-only) and attribute + values (with no tokenisable start or value) longer than 3 bytes are + collected in document order; those occurring more than once go into the + table in first-occurrence order, the rest are split into words and words + occurring more than once (longer than 3 bytes) follow. Literal names are + appended as they are met while encoding, and the XML public ID last. + Every inline string is then searched, table entry by table entry, for + sub-strings to replace with `STR_T` references. + + ## Reproduced upstream quirks + + * The string table holds the text nodes' own buffers, and blank stripping + happens in place while encoding, so a table entry taken from a text node + with surrounding blanks is stripped when that node is encoded — after + its offset and the table length were fixed. The header then declares + more table bytes than are written. Reproduced (`strip_source/3`). + * `current_tag` (which drives binary, WV and DRMREL content encoding) is + reset after every node, so only the first child of an element sees it. + * A whitespace-only text node still counts as content: ` ` gets + the content bit and an `END` with nothing in between. + * The anonymous option keeps a language's registered WBXML public ID. + * Text equal (case-insensitively) to `application/vnd.syncml-devinf+xml` + or `application/vnd.syncml.dmtnds+xml` in a SyncML document is written as + the `+wbxml` media type, wherever it appears. + """ + + import Bitwise + + alias Libwbxml.{Base64, Opaque, Tables, Tree} + alias Libwbxml.Encoder.Strings + alias Libwbxml.Tables.Language + alias Libwbxml.Tree.{Attribute, CData, Element, PI, SubTree, Text} + + @typedoc "The validated option map of `Libwbxml.encode/2`." + @type opts :: %{ + optional(:version) => :"1.0" | :"1.1" | :"1.2" | :"1.3", + optional(:string_table) => boolean(), + optional(:anonymous) => boolean(), + optional(:preserve_whitespace) => boolean(), + optional(atom()) => term() + } + + # WBXML global tokens + @switch_page 0x00 + @end_token 0x01 + @str_i 0x03 + @literal 0x04 + @ext_t_0 0x80 + @str_t 0x83 + @opaque_token 0xC3 + @with_content 0x40 + @with_attrs 0x80 + @token_mask 0x3F + + @charset_utf8 0x6A + @public_id_unknown 0x01 + # WBXML_ENCODER_STRING_TABLE_MIN + @strtbl_min 3 + + @versions %{"1.0": 0x00, "1.1": 0x01, "1.2": 0x02, "1.3": 0x03} + + # Wireless-Village content data types by {code page, token}; everything + # else is a string (wbxml_encode_wv_content). + @wv_types %{ + {0x00, 0x05} => :boolean, + {0x00, 0x18} => :boolean, + {0x00, 0x21} => :boolean, + {0x00, 0x0B} => :integer, + {0x00, 0x0F} => :integer, + {0x00, 0x1A} => :integer, + {0x00, 0x3C} => :integer, + {0x00, 0x11} => :datetime, + {0x01, 0x06} => :boolean, + {0x01, 0x0B} => :boolean, + {0x01, 0x34} => :boolean, + {0x01, 0x36} => :boolean, + {0x01, 0x1C} => :integer, + {0x01, 0x25} => :integer, + {0x01, 0x26} => :integer, + {0x01, 0x27} => :integer, + {0x01, 0x28} => :integer, + {0x01, 0x32} => :integer, + {0x03, 0x09} => :boolean, + {0x03, 0x05} => :integer, + {0x03, 0x06} => :integer, + {0x03, 0x0C} => :integer, + {0x03, 0x0D} => :integer, + {0x03, 0x0E} => :integer, + {0x03, 0x12} => :integer, + {0x03, 0x13} => :integer, + {0x04, 0x0B} => :boolean, + {0x04, 0x1E} => :boolean, + {0x06, 0x08} => :boolean, + {0x06, 0x1A} => :datetime, + {0x07, 0x21} => :boolean, + {0x07, 0x10} => :boolean, + {0x07, 0x22} => :boolean, + {0x09, 0x05} => :boolean, + {0x09, 0x08} => :integer, + {0x09, 0x0A} => :integer + } + + # Encoder state (the WBXMLEncoder struct). `strtbl` is the string table in + # offset order: `%{string, offset, source}` where `source` is the index of + # the text node whose buffer the entry shares (see strip_source/3). + defmodule State do + @moduledoc false + defstruct lang: nil, + version: 0x03, + anonymous: false, + use_strtbl: true, + ignore_empty_text: true, + remove_text_blanks: true, + tag_page: 0, + attr_page: 0, + strtbl: [], + strtbl_len: 0, + text_index: 0, + in_cdata: false, + cdata: [] + end + + @doc """ + Encodes `tree` as a WBXML document. See the module documentation. + """ + @spec encode(Tree.t(), opts()) :: {:ok, binary()} | {:error, Libwbxml.Error.reason()} + def encode(%Tree{} = tree, opts \\ %{}) do + config = %State{ + version: Map.fetch!(@versions, Map.get(opts, :version, :"1.3")), + anonymous: Map.get(opts, :anonymous, false), + use_strtbl: Map.get(opts, :string_table, true), + ignore_empty_text: not Map.get(opts, :preserve_whitespace, false), + remove_text_blanks: not Map.get(opts, :preserve_whitespace, false) + } + + try do + {:ok, encode_document(tree, config)} + catch + {:wbxml_error, reason} -> {:error, reason} + end + end + + # encoder_encode_tree + wbxml_build_result. Also used for embedded + # sub-trees, with the duplicated settings of encoder_duplicate(). + defp encode_document(%Tree{lang: lang_atom, root: root}, %State{} = config) do + lang = lang_atom && Tables.get(lang_atom) + if lang == nil or root == nil, do: fail(:bad_parameter) + + state = %{config | lang: lang, use_strtbl: config.use_strtbl and strtbl_supported?(lang)} + state = if state.use_strtbl, do: strtbl_initialize(state, root), else: state + + {body, state} = encode_node(root, state, nil) + {header, state} = header(state) + + IO.iodata_to_binary([header, string_table(state), body]) + end + + # WV content can be tokenised and OTA Settings has no string tables. + defp strtbl_supported?(%Language{lang: lang}), + do: lang not in [:wv_csp11, :wv_csp12, :ota_settings] + + ## Header (wbxml_fill_header) + + defp header(%State{lang: lang} = state) do + %{wbxml_public_id: public_id, xml_public_id: xml_public_id} = lang.public_id + + if public_id == nil and not state.anonymous and xml_public_id != nil do + # No WBXML public ID: reference the XML public ID in the string table. + {index, state} = + if state.use_strtbl, + do: strtbl_add(state, xml_public_id, nil), + else: {0, %{state | strtbl_len: byte_size(xml_public_id) + 1}} + + {[state.version, 0x00, mb(index), mb(@charset_utf8), mb(state.strtbl_len)], state} + else + public_id = public_id || @public_id_unknown + {[state.version, mb(public_id), mb(@charset_utf8), mb(state.strtbl_len)], state} + end + end + + # wbxml_strtbl_construct, or the lone XML public ID when the table is off. + defp string_table(%State{use_strtbl: true, strtbl: strtbl}), + do: Enum.map(strtbl, &[&1.string, 0]) + + defp string_table(%State{strtbl_len: 0}), do: [] + + defp string_table(%State{lang: lang}), do: [lang.public_id.xml_public_id, 0] + + ## Nodes (parse_node and friends) + + # `current_tag` is the tag entry of the enclosing element for the first + # node below it and nil afterwards, as upstream resets it after each node. + defp encode_node(%Element{} = element, state, _current_tag) do + {tag, state, current_tag} = encode_tag(element, state) + {attrs, state} = encode_attrs(element, state, current_tag) + {children, state} = encode_children(element.children, state, current_tag) + end_tag = if element.children == [], do: [], else: @end_token + {[tag, attrs, children, end_tag], state} + end + + defp encode_node(%Text{data: data}, state, current_tag) do + state = next_text(state) + + cond do + binary_tag?(current_tag) -> + # Binary content (base64 in the XML, decoded by the reader) is opaque. + {opaque(data), state} + + state.in_cdata -> + # Text inside a CDATA section only feeds the section's buffer; SyncML + # turns a lone "\n" into "\r\n" (vObject line ends). + data = if syncml?(state.lang) and data == "\n", do: "\r\n", else: data + {[], %{state | cdata: [state.cdata, data]}} + + true -> + {data, state} = prepare_text(data, state) + + case data do + nil -> {[], state} + data -> value_element_buffer(state, data, :content, current_tag: current_tag) + end + end + end + + # A CDATA section's text is collected into one buffer written as opaque + # data once the section ends. Other nodes inside it (an embedded document + # or an element that upstream's reader hung below the CDATA node) are + # written where they occur, before that opaque. Nested sections are an + # internal error upstream. + defp encode_node(%CData{children: children}, %State{in_cdata: false} = state, current_tag) do + {out, state} = encode_children(children, %{state | in_cdata: true, cdata: []}, current_tag) + + buffer = IO.iodata_to_binary(state.cdata) + state = %{state | in_cdata: false, cdata: []} + {[out, if(buffer == "", do: [], else: opaque(buffer))], state} + end + + defp encode_node(%CData{}, _state, _current_tag), do: fail(:internal) + + defp encode_node(%PI{}, _state, _current_tag), do: fail(:not_implemented) + + # wbxml_encode_tree: an embedded document is a complete WBXML document + # (never anonymous, code pages and string table of its own) inside OPAQUE. + defp encode_node(%SubTree{tree: tree}, state, _current_tag) do + config = %State{ + version: state.version, + anonymous: false, + use_strtbl: state.use_strtbl, + ignore_empty_text: state.ignore_empty_text, + remove_text_blanks: state.remove_text_blanks + } + + {opaque(encode_document(tree, config)), state} + end + + defp encode_children([], state, _current_tag), do: {[], state} + + defp encode_children([child | rest], state, current_tag) do + {out, state} = encode_node(child, state, current_tag) + {rest_out, state} = encode_children(rest, state, nil) + {[out, rest_out], state} + end + + # ignore_empty_text / remove_text_blanks (parse_text). Returns nil for a + # dropped node. + defp prepare_text(data, state) do + cond do + state.ignore_empty_text and Strings.only_whitespace?(data) -> + {nil, state} + + state.remove_text_blanks -> + stripped = Strings.strip_blanks(data) + {stripped, strip_source(state, data, stripped)} + + true -> + {data, state} + end + end + + # NOTE(upstream-quirk): the string table entry created from this very text + # node shares its buffer, so stripping the node strips the entry too; its + # offset and the table length were computed before and stay as they were. + defp strip_source(state, data, data), do: state + + defp strip_source(%State{use_strtbl: true, text_index: index} = state, _data, stripped) do + strtbl = + Enum.map(state.strtbl, fn + %{source: ^index} = entry -> %{entry | string: stripped} + entry -> entry + end) + + %{state | strtbl: strtbl} + end + + defp strip_source(state, _data, _stripped), do: state + + defp next_text(%State{text_index: index} = state), do: %{state | text_index: index + 1} + + ## Tags (wbxml_encode_tag) + + defp encode_tag(%Element{name: name} = element, %State{lang: lang} = state) do + {token, page, current_tag} = + case name do + {:token, entry} -> + {entry.token, entry.page, entry} + + {:literal, literal} -> + case Tables.tag_from_xml(lang, state.tag_page, literal) do + nil -> {0x00, 0x00, nil} + entry -> {entry.token, entry.page, entry} + end + end + + token = if element.children == [], do: token, else: token ||| @with_content + token = if attrs_encoded?(element, lang), do: token ||| @with_attrs, else: token + + if (token &&& @token_mask) == 0x00 do + {out, state} = literal(state, Tree.element_name(name), token) + {out, state, current_tag} + else + {out, state} = tag_token(state, token, page) + {out, state, current_tag} + end + end + + # Attributes are only encoded for languages with an attribute table. + defp attrs_encoded?(%Element{attrs: attrs}, %Language{attrs: table}), + do: attrs != [] and table != [] + + defp tag_token(%State{tag_page: page} = state, token, page), do: {token, state} + + defp tag_token(state, token, page), + do: {[@switch_page, page, token], %{state | tag_page: page}} + + # wbxml_encode_tag_literal / wbxml_encode_attr_start_literal: the name goes + # into the string table and `LITERAL | mask` references it. + defp literal(%State{use_strtbl: false}, _name, _mask), do: fail(:strtbl_disabled) + + defp literal(state, name, mask) do + {index, state} = strtbl_add(state, name, nil) + {[@literal ||| mask, mb(index)], state} + end + + ## Attributes (wbxml_encode_attr, wbxml_encode_attr_start) + + defp encode_attrs(%Element{attrs: attrs} = element, %State{lang: lang} = state, current_tag) do + if attrs_encoded?(element, lang) do + {out, state} = + Enum.reduce(attrs, {[], state}, fn attr, {acc, state} -> + {out, state} = encode_attr(attr, state, element, current_tag) + {[acc, out], state} + end) + + {[out, @end_token], state} + else + {[], state} + end + end + + defp encode_attr(%Attribute{name: name, value: value}, state, element, current_tag) do + {start, state, current_attr, value_left} = attr_start(name, value, state) + + {rest, state} = + case value_left do + nil -> + {[], state} + + value_left -> + value_element_buffer(state, value_left, :attr, + current_attr: current_attr, + current_tag: current_tag, + element: element + ) + end + + {[start, rest], state} + end + + defp attr_start({:token, %{value_prefix: nil} = entry}, value, state) do + {out, state} = attr_token(state, entry.token, entry.page) + {out, state, entry, value} + end + + # A start token with a value prefix must match the start of the value; + # otherwise the attribute is written as a literal with its whole value. + defp attr_start({:token, %{value_prefix: prefix} = entry}, value, state) do + if String.starts_with?(value, prefix) do + value_left = + if byte_size(value) > byte_size(prefix), + do: binary_part(value, byte_size(prefix), byte_size(value) - byte_size(prefix)), + else: nil + + {out, state} = attr_token(state, entry.token, entry.page) + {out, state, entry, value_left} + else + {out, state} = literal(state, entry.name, 0x00) + {out, state, nil, value} + end + end + + defp attr_start({:literal, name}, value, %State{lang: lang} = state) do + case Tables.attr_from_xml(lang, name, value) do + {entry, value_left} -> + {out, state} = attr_token(state, entry.token, entry.page) + {out, state, entry, value_left} + + nil -> + {out, state} = literal(state, name, 0x00) + {out, state, nil, value} + end + end + + defp attr_token(%State{attr_page: page} = state, token, page), do: {token, state} + + defp attr_token(state, token, page), + do: {[@switch_page, page, token], %{state | attr_page: page}} + + ## Values (wbxml_encode_value_element_buffer) + + # Encodes an attribute value (`:attr`) or text content (`:content`): + # language-specific opaques first, then the value is cut into pieces + # around attribute-value tokens (attributes), extension tokens (content) + # and string-table entries, and the pieces are written in order. + defp value_element_buffer(state, "", _ctx, _extra), do: {[], state} + + defp value_element_buffer(%State{lang: lang} = state, buffer, ctx, extra) do + case specific_value(state, buffer, ctx, extra) do + {:encoded, out} -> + {out, state} + + {:not_encoded, buffer} -> + pieces = [{:string, buffer}] + + pieces = + if ctx == :attr do + Enum.reduce(lang.attr_values, pieces, fn entry, pieces -> + split_pieces(pieces, entry.value, {:attr_token, entry}) + end) + else + Enum.reduce(lang.ext_values, pieces, fn entry, pieces -> + # Only whole-buffer matches, and never one-character tokens. + if byte_size(entry.value) < 2 do + pieces + else + Enum.flat_map(pieces, fn + {:string, string} when string == entry.value -> [{:string, ""}, {:ext, entry}] + piece -> [piece] + end) + end + end) + end + + pieces = + if state.use_strtbl do + Enum.reduce(state.strtbl, pieces, fn entry, pieces -> + split_pieces(pieces, entry.string, {:tableref, entry.offset}) + end) + else + pieces + end + + encode_pieces(pieces, state) + end + end + + # Replaces every occurrence of `needle` in the string pieces with `token`, + # leaving the text around it as string pieces (upstream inserts the token + # and the remainder after the piece and truncates the piece in place, + # then keeps searching the remainder). + defp split_pieces(pieces, needle, token) do + Enum.flat_map(pieces, fn + {:string, string} = piece -> + case :binary.split(string, needle, [:global]) do + [_only] -> [piece] + parts -> parts |> Enum.map(&{:string, &1}) |> Enum.intersperse(token) + end + + piece -> + [piece] + end) + end + + # wbxml_encode_value_element_list + defp encode_pieces(pieces, state) do + Enum.reduce(pieces, {[], state}, fn piece, {acc, state} -> + {out, state} = + case piece do + {:string, ""} -> {[], state} + {:string, string} -> {inline_string(string), state} + {:tableref, offset} -> {[@str_t, mb(offset)], state} + {:ext, entry} -> {[@ext_t_0, mb(entry.token)], state} + {:attr_token, entry} -> attr_token(state, entry.token, entry.page) + end + + {[acc, out], state} + end) + end + + # Language-specific value encodings. `{:encoded, iodata}` when the whole + # value was written, `{:not_encoded, buffer}` (possibly rewritten) to fall + # back to string encoding. + defp specific_value(%State{lang: %Language{lang: lang}}, buffer, :attr, extra) do + current_attr = Keyword.get(extra, :current_attr) + + case {lang, current_attr} do + {:si10, %{page: 0x00, token: token}} when token in [0x0A, 0x10] -> + {:encoded, datetime(buffer)} + + {:emn10, %{page: 0x00, token: 0x05}} -> + {:encoded, datetime(buffer)} + + {:ota_settings, %{page: 0x00, token: 0x11}} -> + ota_nokia_icon(buffer, extra) + + _ -> + {:not_encoded, buffer} + end + end + + defp specific_value(%State{lang: %Language{lang: lang} = table}, buffer, :content, extra) do + current_tag = Keyword.get(extra, :current_tag) + + cond do + lang in [:wv_csp11, :wv_csp12] -> + wv_content(table, buffer, current_tag) + + lang == :drmrel10 -> + drmrel_content(buffer, current_tag) + + syncml?(table) -> + {:not_encoded, syncml_media_type(buffer)} + + true -> + {:not_encoded, buffer} + end + end + + # SI 1.0 `created` / `si-expires`, EMN 1.0 `timestamp` + defp datetime(buffer) do + case Opaque.encode_datetime(buffer) do + {:ok, bytes} -> opaque(bytes) + {:error, reason} -> fail(reason) + end + end + + # wbxml_encode_ota_nokia_icon: the VALUE of a is a + # base64 image written as opaque data. + defp ota_nokia_icon(buffer, extra) do + %Element{attrs: attrs} = Keyword.fetch!(extra, :element) + + icon? = + Keyword.get(extra, :current_tag) != nil and + Enum.any?(attrs, fn attr -> + Tree.element_name(attr) == "NAME" and attr.value == "ICON" + end) + + if icon?, do: {:encoded, opaque(Base64.decode_raw(buffer))}, else: {:not_encoded, buffer} + end + + # wbxml_encode_wv_content: integers and datetimes of known elements are + # opaque, any exact extension token value is an EXT_T_0 token. + defp wv_content(table, buffer, current_tag) do + type = + case current_tag do + %{page: page, token: token} -> Map.get(@wv_types, {page, token}, :string) + nil -> :string + end + + case type do + :integer -> + {:ok, bytes} = Opaque.encode_wv_integer(buffer) + {:encoded, opaque(bytes)} + + :datetime -> + case Opaque.encode_wv_datetime(buffer) do + {:ok, {:opaque, bytes}} -> {:encoded, opaque(bytes)} + {:ok, {:inline, text}} -> {:encoded, inline_string(text)} + {:error, reason} -> fail(reason) + end + + _string_or_boolean -> + case Tables.ext_from_xml(table, buffer) do + nil -> {:not_encoded, buffer} + ext -> {:encoded, [@ext_t_0, mb(ext.token)]} + end + end + end + + # wbxml_encode_drmrel_content: (page 0, token 0x0C) content + # is base64 in XML and binary in WBXML. Upstream's decoder never reports + # failure, so undecodable content is an empty opaque. + defp drmrel_content(buffer, %{page: 0x00, token: 0x0C}), + do: {:encoded, opaque(Base64.decode_raw(buffer))} + + defp drmrel_content(buffer, _current_tag), do: {:not_encoded, buffer} + + defp syncml_media_type(buffer) do + case String.downcase(buffer, :ascii) do + "application/vnd.syncml-devinf+xml" -> "application/vnd.syncml-devinf+wbxml" + "application/vnd.syncml.dmtnds+xml" -> "application/vnd.syncml.dmtnds+wbxml" + _ -> buffer + end + end + + defp syncml?(%Language{lang: lang}), do: lang in [:syncml10, :syncml11, :syncml12] + + defp binary_tag?(%{options: options}), do: MapSet.member?(options, :binary) + defp binary_tag?(_current_tag), do: false + + ## Primitives + + defp inline_string(string), do: [@str_i, string, 0] + + defp opaque(data), do: [@opaque_token, mb(byte_size(data)), data] + + defp mb(value), do: Strings.mb_uint32(value) + + defp fail(reason), do: throw({:wbxml_error, reason}) + + ## String table (wbxml_strtbl_*) + + # wbxml_strtbl_initialize: strings referenced more than once, then words + # (of the strings referenced once) used more than once. + defp strtbl_initialize(state, root) do + {_index, strings} = collect_strings(root, state.lang, 0, []) + strings = Enum.reverse(strings) + {state, one_ref} = check_references(state, strings) + + words = + for {string, _source} <- one_ref, word <- Strings.split_words(string), do: {word, nil} + + {state, _one_ref} = check_references(state, words) + state + end + + # wbxml_strtbl_collect_strings, in document order. Text nodes are numbered + # like the encoder numbers them (`text_index`) so an entry can be tied to + # its source node. Yields `{string, source}` pairs, reversed. + defp collect_strings(%Text{data: data}, _lang, index, acc) do + acc = + if Strings.only_whitespace?(data) or byte_size(data) <= @strtbl_min, + do: acc, + else: [{data, index + 1} | acc] + + {index + 1, acc} + end + + defp collect_strings(%Element{attrs: attrs, children: children}, lang, index, acc) do + acc = Enum.reduce(attrs, acc, &collect_attr_value(&1, &2, lang)) + collect_children(children, lang, index, acc) + end + + defp collect_strings(%CData{children: children}, lang, index, acc), + do: collect_children(children, lang, index, acc) + + defp collect_strings(_other, _lang, index, acc), do: {index, acc} + + defp collect_children(children, lang, index, acc) do + Enum.reduce(children, {index, acc}, fn child, {index, acc} -> + collect_strings(child, lang, index, acc) + end) + end + + # Attribute values long enough, with no tokenisable start (or only the + # plain-name start) and containing no attribute-value token. + defp collect_attr_value(%Attribute{name: name, value: value}, acc, lang) do + if byte_size(value) > @strtbl_min do + start = Tables.attr_from_xml(lang, Tree.element_name(name), value) + + if (start == nil or elem(start, 1) == value) and + not Tables.contains_attr_value?(lang, value), + do: [{value, nil} | acc], + else: acc + else + acc + end + end + + # wbxml_strtbl_check_references: count exact duplicates (first-occurrence + # order), add those seen more than once to the table, return the others. + defp check_references(state, strings) do + {order, counts} = + Enum.reduce(strings, {[], %{}}, fn {string, source}, {order, counts} -> + case counts do + %{^string => {count, source0}} -> {order, %{counts | string => {count + 1, source0}}} + _ -> {[string | order], Map.put(counts, string, {1, source})} + end + end) + + Enum.reduce(Enum.reverse(order), {state, []}, fn string, {state, one_ref} -> + {count, source} = Map.fetch!(counts, string) + + if count > 1 and byte_size(string) > @strtbl_min do + {_index, state} = strtbl_add(state, string, source) + {state, one_ref} + else + {state, [{string, source} | one_ref]} + end + end) + |> then(fn {state, one_ref} -> {state, Enum.reverse(one_ref)} end) + end + + # wbxml_strtbl_add_element: returns the offset of `string`, appending it + # if it is not in the table yet. + defp strtbl_add(%State{strtbl: strtbl, strtbl_len: len} = state, string, source) do + case Enum.find(strtbl, &(&1.string == string)) do + %{offset: offset} -> + {offset, state} + + nil -> + entry = %{string: string, offset: len, source: source} + {len, %{state | strtbl: strtbl ++ [entry], strtbl_len: len + byte_size(string) + 1}} + end + end +end diff --git a/lib/libwbxml/encoder/strings.ex b/lib/libwbxml/encoder/strings.ex new file mode 100644 index 0000000..8d02fd5 --- /dev/null +++ b/lib/libwbxml/encoder/strings.ex @@ -0,0 +1,258 @@ +defmodule Libwbxml.Encoder.Strings do + @moduledoc """ + Byte-string helpers ported from upstream `wbxml_buffers.c` (libwbxml + 0.11.10), limited to the functions whose *semantics* the encoder and the + opaque codecs depend on. C buffer plumbing (create/append/insert/delete) + has no counterpart; Elixir binaries replace it. + + ## What counts as blank + + Upstream uses C's `isspace()` in the "C" locale on unsigned bytes, so a + blank is exactly one of the six bytes space, `\\t`, `\\n`, `\\v` (0x0B), + `\\f` (0x0C) and `\\r`. Bytes >= 0x80 (e.g. UTF-8 encoded U+00A0) are never + blank. + + ## Reproduced upstream quirks + + * `shrink_blanks/1` is an in-place loop with an off-by-one: a blank followed + by **exactly one** more blank keeps both bytes (the second one verbatim, + not normalised to a space); a blank followed by two or more blanks + collapses to a single space. See the function doc. + * `hex_to_binary/1` maps any non-hex byte to the nibble `0` and drops a + trailing odd nibble. + """ + + import Bitwise + + @blanks [?\s, ?\t, ?\n, ?\v, ?\f, ?\r] + + defguardp is_blank(byte) when byte in @blanks + + @doc """ + True for the six C-locale `isspace()` bytes. + """ + @spec blank?(byte()) :: boolean() + def blank?(byte) when is_blank(byte), do: true + def blank?(byte) when is_integer(byte), do: false + + @doc """ + True when every byte is blank (`wbxml_buffer_contains_only_whitespaces`). + The empty binary is only-whitespace. + + iex> Libwbxml.Encoder.Strings.only_whitespace?(" \\t\\n") + true + iex> Libwbxml.Encoder.Strings.only_whitespace?("") + true + iex> Libwbxml.Encoder.Strings.only_whitespace?(" a ") + false + """ + @spec only_whitespace?(binary()) :: boolean() + def only_whitespace?(<>) when is_blank(byte), do: only_whitespace?(rest) + def only_whitespace?(<<>>), do: true + def only_whitespace?(<<_, _::binary>>), do: false + + @doc """ + Removes leading and trailing blanks (`wbxml_buffer_strip_blanks`). + + iex> Libwbxml.Encoder.Strings.strip_blanks(" \\n\\t\\f\\rtest image\\t\\v \\n") + "test image" + """ + @spec strip_blanks(binary()) :: binary() + def strip_blanks(binary) when is_binary(binary) do + binary |> strip_leading() |> strip_trailing() + end + + defp strip_leading(<>) when is_blank(byte), do: strip_leading(rest) + defp strip_leading(binary), do: binary + + defp strip_trailing(<<>>), do: <<>> + + defp strip_trailing(binary) do + prefix_size = byte_size(binary) - 1 + + case binary do + <> when is_blank(byte) -> strip_trailing(prefix) + _ -> binary + end + end + + @doc """ + Removes every blank byte (`wbxml_buffer_no_spaces`). Used by + `Libwbxml.Base64.decode/1`. + + iex> Libwbxml.Encoder.Strings.remove_blanks("dG Vz\\ndA==") + "dGVzdA==" + """ + @spec remove_blanks(binary()) :: binary() + def remove_blanks(binary) when is_binary(binary) do + for <>, not blank?(byte), into: <<>>, do: <> + end + + @doc """ + Collapses runs of blanks (`wbxml_buffer_shrink_blanks`), faithfully + including upstream's off-by-one. + + Upstream walks the buffer once. At each blank byte it replaces that byte + with a space, counts the blanks that follow, and deletes them only if there + are **more than one**; it then skips past the byte after the run. The + observable rules are therefore: + + * a lone blank becomes a space; + * a run of exactly two blanks becomes a space followed by the second byte + **unchanged** (`"a\\n\\tb"` -> `"a \\tb"`, `"a b"` -> `"a b"`); + * a run of three or more blanks becomes a single space; + * leading and trailing runs are treated the same way (they are not + removed; use `strip_blanks/1` for that). + + iex> Libwbxml.Encoder.Strings.shrink_blanks(" \\n\\t\\rtest\\n\\f\\t image\\t\\v \\n") + " test image " + iex> Libwbxml.Encoder.Strings.shrink_blanks("a b c") + "a b c" + iex> Libwbxml.Encoder.Strings.shrink_blanks("a b") + "a b" + """ + @spec shrink_blanks(binary()) :: binary() + def shrink_blanks(binary) when is_binary(binary), do: do_shrink(binary, []) + + defp do_shrink(<>, acc) when is_blank(byte) do + {run, rest} = take_blanks(rest, <<>>) + + acc = + case byte_size(run) do + # `j - i > 1` is false: the single following blank survives as-is. + 1 -> [run, ?\s | acc] + # 0 following blanks: nothing to delete; >= 2: all of them deleted. + _ -> [?\s | acc] + end + + do_shrink(rest, acc) + end + + defp do_shrink(<>, acc), do: do_shrink(rest, [byte | acc]) + defp do_shrink(<<>>, acc), do: acc |> Enum.reverse() |> IO.iodata_to_binary() + + defp take_blanks(<>, run) when is_blank(byte), + do: take_blanks(rest, <>) + + defp take_blanks(rest, run), do: {run, rest} + + @doc """ + Splits on runs of blanks, dropping empty words (`wbxml_buffer_split_words`). + + iex> Libwbxml.Encoder.Strings.split_words(" 1\\n2\\r3\\v4\\f5\\t") + ["1", "2", "3", "4", "5"] + iex> Libwbxml.Encoder.Strings.split_words(" \\n\\r\\v\\f\\t") + [] + """ + @spec split_words(binary()) :: [binary()] + def split_words(binary) when is_binary(binary) do + binary + |> :binary.split(Enum.map(@blanks, &<<&1>>), [:global, :trim_all]) + end + + @doc """ + Decodes a hex string to bytes (`wbxml_buffer_hex_to_binary`). + + Every byte is first mapped to a nibble: `0-9`, `a-f` and `A-F` as expected, + and **any other byte to 0** (upstream does not report an error). Nibbles + are then paired; a trailing unpaired nibble is dropped. + + iex> Libwbxml.Encoder.Strings.hex_to_binary("7465737420696D616765") + "test image" + iex> Libwbxml.Encoder.Strings.hex_to_binary("7G1") + <<0x70>> + """ + @spec hex_to_binary(binary()) :: binary() + def hex_to_binary(binary) when is_binary(binary) do + for <>, into: <<>>, do: <> + end + + defp nibble(byte) when byte in ?0..?9, do: byte - ?0 + defp nibble(byte) when byte in ?a..?f, do: byte - ?a + 10 + defp nibble(byte) when byte in ?A..?F, do: byte - ?A + 10 + defp nibble(_byte), do: 0 + + @doc """ + Encodes bytes as hex (`wbxml_buffer_binary_to_hex`), upper-case by default + as every upstream caller requests. + + iex> Libwbxml.Encoder.Strings.binary_to_hex("test image") + "7465737420696D616765" + iex> Libwbxml.Encoder.Strings.binary_to_hex(<<0xAB>>, :lower) + "ab" + """ + @spec binary_to_hex(binary(), :upper | :lower) :: binary() + def binary_to_hex(binary, letter_case \\ :upper) when is_binary(binary) do + Base.encode16(binary, case: letter_case) + end + + @doc """ + Removes trailing `0` bytes (`wbxml_buffer_remove_trailing_zeros`). + + iex> Libwbxml.Encoder.Strings.remove_trailing_zeros(<<"test image", 0, 0, 0>>) + "test image" + iex> Libwbxml.Encoder.Strings.remove_trailing_zeros(<<0, ?t, 0>>) + <<0, ?t>> + """ + @spec remove_trailing_zeros(binary()) :: binary() + def remove_trailing_zeros(<<>>), do: <<>> + + def remove_trailing_zeros(binary) when is_binary(binary) do + prefix_size = byte_size(binary) - 1 + + case binary do + <> -> remove_trailing_zeros(prefix) + _ -> binary + end + end + + @doc """ + Position of the first occurrence of `needle` in `haystack` at or after + `from` (`wbxml_buffer_search` / `wbxml_buffer_search_cstr`), or `nil`. + + As upstream, an empty needle is always found at position `0`, whatever + `from` is. + + iex> Libwbxml.Encoder.Strings.search("test123ABCD", "123") + 4 + iex> Libwbxml.Encoder.Strings.search("test123ABCD", "123", 5) + nil + iex> Libwbxml.Encoder.Strings.search("abc", "") + 0 + """ + @spec search(binary(), binary(), non_neg_integer()) :: non_neg_integer() | nil + def search(haystack, needle, from \\ 0) + + def search(_haystack, <<>>, _from), do: 0 + + def search(haystack, needle, from) when is_binary(haystack) and is_binary(needle) do + if from < byte_size(haystack) do + case :binary.match(haystack, needle, scope: {from, byte_size(haystack) - from}) do + {pos, _len} -> pos + :nomatch -> nil + end + else + nil + end + end + + @doc """ + Encodes a non-negative integer as a WBXML multi-byte integer + (`wbxml_buffer_append_mb_uint_32`): big-endian groups of 7 bits, every + byte but the last with the high bit set. + + iex> Libwbxml.Encoder.Strings.mb_uint32(0) + <<0>> + iex> Libwbxml.Encoder.Strings.mb_uint32(65537) + <<0x84, 0x80, 0x01>> + """ + @spec mb_uint32(non_neg_integer()) :: binary() + def mb_uint32(value) when is_integer(value) and value >= 0 do + mb_uint32(value >>> 7, <>) + end + + defp mb_uint32(0, acc), do: acc + + defp mb_uint32(value, acc), + do: mb_uint32(value >>> 7, <<0x80 ||| (value &&& 0x7F), acc::binary>>) +end diff --git a/lib/libwbxml/error.ex b/lib/libwbxml/error.ex new file mode 100644 index 0000000..ee95a4a --- /dev/null +++ b/lib/libwbxml/error.ex @@ -0,0 +1,241 @@ +defmodule Libwbxml.Error do + @moduledoc """ + Error reasons and messages, ported from upstream `wbxml_errors.h` / + `wbxml_errors.c` (libwbxml 0.11.10). + + Every public `Libwbxml` function reports failures as `{:error, reason}` where + `reason` is one of the atoms in `t:reason/0`. Each atom is the snake_case + form of the upstream `WBXML_ERROR_*` enum name, and `message/1` returns the + upstream English description verbatim. + + The module is also an exception, so the bang variants of the API can + `raise Libwbxml.Error, reason: :unknown_public_id`. + + Two upstream codes that are not errors (`WBXML_OK` → `:ok` and + `WBXML_NOT_ENCODED` → `:not_encoded`) are accepted by `message/1`, + `code/1` and `from_code/1` for completeness, but they are not part of + `t:reason/0` and are not returned by `reasons/0`. + """ + + # {code, atom, upstream message} in `WBXMLError` enum order. Messages are + # copied verbatim from `wbxml_errors.c`. + @table [ + {0, :ok, "No Error"}, + {1, :not_encoded, "Not Encoded"}, + # Generic errors + {10, :attr_table_undefined, "Attribute Table Undefined"}, + {11, :bad_datetime, "Bad Datetime Format"}, + {12, :bad_parameter, "Bad Parameter"}, + {13, :internal, "Internal Error"}, + {14, :lang_table_undefined, "Languages Table Undefined"}, + {15, :not_enough_memory, "Not Enough Memory"}, + {16, :not_implemented, "Not Implemented"}, + {17, :tag_table_undefined, "Tag Table Undefined"}, + {18, :b64_enc, "Failed to encode Base64"}, + {19, :b64_dec, "Failed to decode Base64"}, + {20, :wv_datetime_format, "Bad Wireless-Village Date and Time Format"}, + {30, :no_charset_conv, "No built-in charset converter (Compiled without libiconv)"}, + {31, :charset_str_len, "Bad string length, can't convert"}, + {32, :charset_unknown, "The character set is unknown."}, + {33, :charset_conv_init, "The converter for the character set cannot be initialized."}, + {34, :charset_conv, "The character conversion failed."}, + {35, :charset_not_found, "The character set cannot be found."}, + # WBXML parser errors + {40, :attr_value_table_undefined, "Attribute Value Table Undefined"}, + {41, :bad_literal_index, "Bad Literal Index"}, + {42, :bad_null_terminated_string_in_string_table, + "Not NULL Terminated String in String Table"}, + {43, :bad_opaque_length, "Bad Opaque Length"}, + {44, :empty_wbxml, "Empty WBXML"}, + {45, :end_of_buffer, "Unexpected End Of WBXML Buffer"}, + {46, :entity_code_overflow, "Entity Code Overflow"}, + {47, :ext_value_table_undefined, "Extension Value Table Undefined"}, + {48, :invalid_strtbl_index, "Invalid String Table Index"}, + {49, :literal_not_null_terminated_in_string_table, + "Literal Not NULL Terminated in String Table"}, + {50, :not_null_terminated_inline_string, "Not NULL Terminated Inline String"}, + {51, :null_parser, "Null Parser"}, + {52, :null_string_table, "No String Table In Document"}, + {53, :string_expected, "String Expected"}, + {54, :strtbl_length, "Bad String Table Length"}, + {60, :unknown_attr, "Unknown Attribute"}, + {61, :unknown_attr_value, "Unknown Attribute Value"}, + {62, :unknown_extension_token, "Unknown Extension Token"}, + {63, :unknown_extension_value, "Unknown Extension Value token"}, + {64, :unknown_public_id, "Unknown Public ID"}, + {65, :unknown_tag, "Unknown Tag"}, + {70, :unvalid_mbuint32, "Unvalid MultiByte UINT32"}, + {80, :wv_integer_overflow, "Wireless-Village Integer Overflow"}, + # WBXML encoder errors + {90, :encoder_append_data, "Can't append data to output buffer"}, + {100, :strtbl_disabled, "String Table generation disabled: can't encode Literal"}, + {101, :unknown_xml_language, "The XML language is unknown."}, + {102, :xml_node_not_allowed, "XML Node Type not allowed"}, + {103, :xml_null_attr_name, "NULL XML Attribute Name"}, + {104, :xml_parsing_failed, "Parsing of XML Document Failed"}, + {110, :xml_devinf_conv_failed, "The conversion of a XML DevInf document failed"}, + {120, :no_xmlparser, + "Can't parse XML (Compiled without Expat): XML to WBXML conversion not possible"}, + {121, :xmlparser_output_utf16, + "XML Parser (Expat) is outputting UTF-16, so you have two choices :\n" <> + " - Get the iconv library (http://www.gnu.org/software/libiconv/)\n" <> + " - Use a version of Expat that output UTF-8"}, + {122, :invalid_unicode, "Invalid Unicode character detected."} + ] + + @unknown_message "Unknown Error Code" + + @non_errors [:ok, :not_encoded] + + @reasons for {_code, atom, _msg} <- @table, atom not in @non_errors, do: atom + + @typedoc """ + An error reason. One atom per `WBXML_ERROR_*` value in upstream + `wbxml_errors.h`, in enum order. + """ + @type reason :: + :attr_table_undefined + | :bad_datetime + | :bad_parameter + | :internal + | :lang_table_undefined + | :not_enough_memory + | :not_implemented + | :tag_table_undefined + | :b64_enc + | :b64_dec + | :wv_datetime_format + | :no_charset_conv + | :charset_str_len + | :charset_unknown + | :charset_conv_init + | :charset_conv + | :charset_not_found + | :attr_value_table_undefined + | :bad_literal_index + | :bad_null_terminated_string_in_string_table + | :bad_opaque_length + | :empty_wbxml + | :end_of_buffer + | :entity_code_overflow + | :ext_value_table_undefined + | :invalid_strtbl_index + | :literal_not_null_terminated_in_string_table + | :not_null_terminated_inline_string + | :null_parser + | :null_string_table + | :string_expected + | :strtbl_length + | :unknown_attr + | :unknown_attr_value + | :unknown_extension_token + | :unknown_extension_value + | :unknown_public_id + | :unknown_tag + | :unvalid_mbuint32 + | :wv_integer_overflow + | :encoder_append_data + | :strtbl_disabled + | :unknown_xml_language + | :xml_node_not_allowed + | :xml_null_attr_name + | :xml_parsing_failed + | :xml_devinf_conv_failed + | :no_xmlparser + | :xmlparser_output_utf16 + | :invalid_unicode + + @typedoc "A reason or one of the two non-error upstream codes." + @type code_atom :: reason() | :ok | :not_encoded + + @type t :: %__MODULE__{reason: reason() | nil, message: String.t()} + + defexception [:reason, :message] + + @impl Exception + def exception(opts) when is_list(opts) do + reason = Keyword.get(opts, :reason) + message = Keyword.get(opts, :message) || message(reason) + %__MODULE__{reason: reason, message: message} + end + + def exception(reason) when is_atom(reason) do + %__MODULE__{reason: reason, message: message(reason)} + end + + @doc """ + Returns the upstream English description of a reason (or of a raw + `WBXMLError` integer code), or `"Unknown Error Code"` when it is not known, + exactly as `wbxml_errors_string/1` does. + + When given a `%Libwbxml.Error{}` struct this is the `Exception.message/1` + callback. + + iex> Libwbxml.Error.message(:unknown_public_id) + "Unknown Public ID" + iex> Libwbxml.Error.message(127) + "Unknown Error Code" + """ + @impl Exception + @spec message(t() | code_atom() | integer() | term()) :: String.t() + def message(%__MODULE__{message: message}) when is_binary(message), do: message + def message(%__MODULE__{reason: reason}), do: message(reason) + + for {code, atom, msg} <- @table do + def message(unquote(atom)), do: unquote(msg) + def message(unquote(code)), do: unquote(msg) + end + + def message(_other), do: @unknown_message + + @doc """ + Every error reason, in upstream enum order (`:ok` and `:not_encoded` + excluded). + """ + @spec reasons() :: [reason()] + def reasons, do: @reasons + + @doc """ + The integer `WBXMLError` value of a reason. + + iex> Libwbxml.Error.code(:unknown_public_id) + 64 + """ + @spec code(code_atom()) :: non_neg_integer() + for {code, atom, _msg} <- @table do + def code(unquote(atom)), do: unquote(code) + end + + @doc """ + Maps an integer `WBXMLError` value to its reason atom, or `nil` for an + unknown code. + + iex> Libwbxml.Error.from_code(64) + :unknown_public_id + iex> Libwbxml.Error.from_code(127) + nil + """ + @spec from_code(integer()) :: code_atom() | nil + for {code, atom, _msg} <- @table do + def from_code(unquote(code)), do: unquote(atom) + end + + def from_code(_code), do: nil + + @doc """ + Maps an upstream error message (as returned by `wbxml_errors_string/1`, + as a string or charlist) back to its reason atom, or `nil` if the message + is not one of upstream's. + + iex> Libwbxml.Error.from_message("Unknown Public ID") + :unknown_public_id + """ + @spec from_message(String.t() | charlist()) :: code_atom() | nil + def from_message(message) when is_list(message), do: from_message(List.to_string(message)) + + for {_code, atom, msg} <- @table do + def from_message(unquote(msg)), do: unquote(atom) + end + + def from_message(_message), do: nil +end diff --git a/lib/libwbxml/opaque.ex b/lib/libwbxml/opaque.ex new file mode 100644 index 0000000..c3330f7 --- /dev/null +++ b/lib/libwbxml/opaque.ex @@ -0,0 +1,329 @@ +defmodule Libwbxml.Opaque do + @moduledoc """ + Language-specific codecs for WBXML `OPAQUE` payloads, shared by the parser + and the encoder. + + Faithful ports of the static helpers in upstream `wbxml_parser.c` + (`decode_datetime`, `decode_wv_integer`, `decode_wv_datetime`) and + `wbxml_encoder.c` (`wbxml_encode_datetime`, `wbxml_encode_wv_integer`, + `wbxml_encode_wv_datetime{,_opaque}`) from libwbxml 0.11.10, including + their quirks. All vectors in the test suite were generated by running the + C functions. + + Decoders take the raw opaque bytes (without the `OPAQUE` token and length) + and return the text that goes into the tree; encoders take that text and + return the bytes to wrap in `OPAQUE`. + + ## OMA datetime (SI, EMN) + + `%Y%m%d%H%M%S` packed as BCD, 4 to 7 bytes: `20 02 04 16 06 40 12` is + `2002-04-16T06:40:12Z`. Omitted trailing fields decode as zero. + + * `decode_datetime/1`: fewer than 4 or more than 7 bytes -> + `{:error, :bad_datetime}`. Bytes are not validated as BCD: nibbles + `A`-`F` are copied into the string as letters. + * `encode_datetime/1`: `T`, `Z`, `-` and `:` are removed; any other + non-digit -> `{:error, :bad_datetime}`. The remaining digits are packed + two per byte, an odd trailing digit is dropped, and **trailing zero + bytes are removed** (`2002-04-16T06:40:00Z` -> 6 bytes, + `2002-04-16T00:00:00Z` -> 4 bytes). Upstream crashes on the empty + string; this port returns `{:ok, <<>>}` (an empty opaque), which is what + it produces for inputs that become empty after digit stripping. + + ## Wireless-Village integer + + Big-endian unsigned, 1 to 4 bytes, but upstream's accumulator is a 32-bit + `unsigned int`, so: + + * `decode_wv_integer/1` accumulates **modulo 2^32** and never returns + `{:error, :wv_integer_overflow}` — the upstream check `> 0xffffffff` can + never be true. Empty input decodes to `"0"`. The result is the decimal + string upstream puts in the tree. + * `encode_wv_integer/1` parses like C: if the second character is `x`/`X` + the text goes through `strtol(…, 16)`, else `atol` (leading blanks, + optional sign, digits, stop at the first other character, saturate at + +/-2^63). The value is then truncated to 32 bits and written as the + minimal big-endian byte string — empty for 0, so `4294967296` and `""` + both encode as a zero-length opaque and `-1` as `FF FF FF FF`. + + ## Wireless-Village datetime + + A 6-byte packed form of `YYYYMMDDThhmmss[Z|A-Z]`: year 12 bits, month 4, + day 5, hour 5, minute 6, second 6 (48 bits = 5 bytes), then one byte + holding the time-zone letter or 0. + + * `decode_wv_datetime/1`: anything but exactly 6 bytes -> + `{:error, :wv_datetime_format}`. The year is printed without padding, + the other fields with two digits, and **the seconds are omitted when + zero**. Byte 6 = 0 appends `Z`; a letter `A`-`Z` other than `J` is + appended as-is; any other value appends nothing. + * `encode_wv_datetime/1` returns `{:ok, {:inline, text}}` when the text + contains `-`, `+` or `:` or ends in `Z` (upstream emits the ISO 8601 long + form as an inline string instead of an opaque), otherwise + `{:ok, {:opaque, bytes}}`: 13- and 14-character inputs get `00` seconds + appended/inserted, the length must then be 15 or 16, character 9 must be + `T`, a 16th character must be a time zone letter `A`-`Z` other than `J`, + all other characters must be digits, and fields wider than their bit + width are silently masked (year 4095 max). + """ + + import Bitwise + + alias Libwbxml.Encoder.Strings + + @type reason :: Libwbxml.Error.reason() + + @doc """ + Decodes an OMA (SI/EMN) BCD datetime opaque into `YYYY-MM-DDThh:mm:ssZ`. + + iex> Libwbxml.Opaque.decode_datetime(<<0x20, 0x02, 0x04, 0x16, 0x06, 0x40>>) + {:ok, "2002-04-16T06:40:00Z"} + iex> Libwbxml.Opaque.decode_datetime(<<0x20, 0x02, 0x04>>) + {:error, :bad_datetime} + """ + @spec decode_datetime(binary()) :: {:ok, String.t()} | {:error, :bad_datetime} + def decode_datetime(binary) when is_binary(binary) do + hex = Strings.binary_to_hex(binary, :upper) + + case hex do + <> + when byte_size(time) in [0, 2, 4, 6] -> + {hour, minute, second} = + case time do + <<>> -> {"00", "00", "00"} + <> -> {h, "00", "00"} + <> -> {h, m, "00"} + <> -> {h, m, s} + end + + {:ok, "#{year}-#{month}-#{day}T#{hour}:#{minute}:#{second}Z"} + + _ -> + {:error, :bad_datetime} + end + end + + @doc """ + Encodes an OMA (SI/EMN) datetime string as BCD opaque bytes. + + iex> Libwbxml.Opaque.encode_datetime("2002-04-16T06:40:12Z") + {:ok, <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40, 0x12>>} + iex> Libwbxml.Opaque.encode_datetime("2002-04-16T06:40:00Z") + {:ok, <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40>>} + iex> Libwbxml.Opaque.encode_datetime("2002/04/16") + {:error, :bad_datetime} + """ + @spec encode_datetime(String.t()) :: {:ok, binary()} | {:error, :bad_datetime} + def encode_datetime(text) when is_binary(text) do + case keep_digits(text, <<>>) do + {:ok, digits} -> + {:ok, digits |> Strings.hex_to_binary() |> Strings.remove_trailing_zeros()} + + :error -> + {:error, :bad_datetime} + end + end + + defp keep_digits(<>, acc) when byte in ?0..?9, + do: keep_digits(rest, <>) + + defp keep_digits(<>, acc) when byte in [?T, ?Z, ?-, ?:], + do: keep_digits(rest, acc) + + defp keep_digits(<<_other, _rest::binary>>, _acc), do: :error + defp keep_digits(<<>>, acc), do: {:ok, acc} + + @doc """ + Decodes a Wireless-Village integer opaque into its decimal string. + + iex> Libwbxml.Opaque.decode_wv_integer(<<0x01, 0x00>>) + {:ok, "256"} + iex> Libwbxml.Opaque.decode_wv_integer(<<0x01, 0, 0, 0, 0>>) + {:ok, "0"} + """ + @spec decode_wv_integer(binary()) :: {:ok, String.t()} + def decode_wv_integer(binary) when is_binary(binary) do + # NOTE(upstream-quirk): `the_int` is a 32-bit WB_ULONG, so the value wraps + # and WBXML_ERROR_WV_INTEGER_OVERFLOW is unreachable. + value = + for <>, reduce: 0 do + acc -> (acc <<< 8 ||| byte) &&& 0xFFFFFFFF + end + + {:ok, Integer.to_string(value)} + end + + @doc """ + Encodes a Wireless-Village integer string as big-endian opaque bytes. + + iex> Libwbxml.Opaque.encode_wv_integer("256") + {:ok, <<0x01, 0x00>>} + iex> Libwbxml.Opaque.encode_wv_integer("0x1A") + {:ok, <<0x1A>>} + iex> Libwbxml.Opaque.encode_wv_integer("0") + {:ok, <<>>} + """ + @spec encode_wv_integer(String.t()) :: {:ok, binary()} + def encode_wv_integer(text) when is_binary(text) do + base = + case text do + <<_, x, _::binary>> when x in [?x, ?X] -> 16 + _ -> 10 + end + + value = c_strtol(text, base) &&& 0xFFFFFFFF + + case value do + 0 -> {:ok, <<>>} + _ -> {:ok, :binary.encode_unsigned(value, :big)} + end + end + + @long_max (1 <<< 63) - 1 + @long_min -(1 <<< 63) + + # strtol()/atol() emulation: optional leading blanks, optional sign, for + # base 16 an optional 0x/0X prefix, then digits up to the first other byte. + # No digits -> 0. Saturates at LONG_MIN/LONG_MAX (64-bit long). + defp c_strtol(text, base) do + text = skip_blanks(text) + + {sign, text} = + case text do + <> -> {-1, rest} + <> -> {1, rest} + _ -> {1, text} + end + + text = + case {base, text} do + {16, <>} when x in [?x, ?X] -> rest + _ -> text + end + + digits = take_digits(text, base, <<>>) + + value = + case digits do + <<>> -> 0 + _ -> sign * String.to_integer(digits, base) + end + + value |> min(@long_max) |> max(@long_min) + end + + defp skip_blanks(<>) when byte in [?\s, ?\t, ?\n, ?\v, ?\f, ?\r], + do: skip_blanks(rest) + + defp skip_blanks(text), do: text + + defp take_digits(<>, base, acc) do + digit? = + byte in ?0..?9 or + (base == 16 and (byte in ?a..?f or byte in ?A..?F)) + + if digit?, do: take_digits(rest, base, <>), else: acc + end + + defp take_digits(<<>>, _base, acc), do: acc + + @doc """ + Decodes a 6-byte Wireless-Village datetime opaque into + `YYYYMMDDThhmm[ss][Z|tz]`. + + iex> Libwbxml.Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, 0x00>>) + {:ok, "20020416T064012Z"} + iex> Libwbxml.Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x00, ?A>>) + {:ok, "20020416T0640A"} + iex> Libwbxml.Opaque.decode_wv_datetime(<<1, 2, 3>>) + {:error, :wv_datetime_format} + """ + @spec decode_wv_datetime(binary()) :: {:ok, String.t()} | {:error, :wv_datetime_format} + def decode_wv_datetime(<>) do + year = ((b0 &&& 0x3F) <<< 6) + (b1 >>> 2 &&& 0x3F) + month = (b1 &&& 0x03) <<< 2 ||| (b2 >>> 6 &&& 0x03) + day = b2 >>> 1 &&& 0x1F + hour = (b2 &&& 0x01) <<< 4 ||| (b3 >>> 4 &&& 0x0F) + minute = (b3 &&& 0x0F) <<< 2 ||| (b4 >>> 6 &&& 0x03) + second = b4 &&& 0x3F + + seconds = if second == 0, do: "", else: pad2(second) + base = "#{year}#{pad2(month)}#{pad2(day)}T#{pad2(hour)}#{pad2(minute)}#{seconds}" + + zone = + cond do + tz == 0 -> "Z" + tz < ?A or tz > ?Z or tz == ?J -> "" + true -> <> + end + + {:ok, base <> zone} + end + + def decode_wv_datetime(binary) when is_binary(binary), do: {:error, :wv_datetime_format} + + defp pad2(value), do: value |> Integer.to_string() |> String.pad_leading(2, "0") + + @doc """ + Encodes a Wireless-Village datetime string, either as 6 opaque bytes or, + for the ISO 8601 long form, as an inline string. + + iex> Libwbxml.Opaque.encode_wv_datetime("20020416T064012") + {:ok, {:opaque, <<0x1F, 0x49, 0x20, 0x6A, 0x0C, 0x00>>}} + iex> Libwbxml.Opaque.encode_wv_datetime("20020416T064012Z") + {:ok, {:inline, "20020416T064012Z"}} + iex> Libwbxml.Opaque.encode_wv_datetime("20020416T0640A") + {:ok, {:opaque, <<0x1F, 0x49, 0x20, 0x6A, 0x00, ?A>>}} + iex> Libwbxml.Opaque.encode_wv_datetime("20020416X064012") + {:error, :wv_datetime_format} + """ + @spec encode_wv_datetime(String.t()) :: + {:ok, {:opaque, binary()} | {:inline, String.t()}} | {:error, :wv_datetime_format} + def encode_wv_datetime(text) when is_binary(text) do + inline? = + String.contains?(text, ["-", "+", ":"]) or String.ends_with?(text, "Z") + + if inline?, do: {:ok, {:inline, text}}, else: encode_wv_datetime_opaque(text) + end + + defp encode_wv_datetime_opaque(text) do + # Tolerate datetimes that forget the seconds. + text = + case byte_size(text) do + 13 -> text <> "00" + 14 -> binary_part(text, 0, 13) <> "00" <> binary_part(text, 13, 1) + _ -> text + end + + with {:ok, digits, tz} <- split_wv_datetime(text), + true <- all_digits?(digits) do + <> = digits + + [year, month, day, hour, minute, second] = + Enum.map([year, month, day, hour, minute, second], &String.to_integer/1) + + o0 = (year &&& 0xFC0) >>> 6 + o1 = (year &&& 0x3F) <<< 2 ||| (month &&& 0xC) >>> 2 + o2 = ((month &&& 0x3) <<< 5 ||| (day &&& 0x1F)) <<< 1 ||| (hour &&& 0x10) >>> 4 + o3 = (hour &&& 0xF) <<< 4 ||| (minute &&& 0x3C) >>> 2 + o4 = (minute &&& 0x3) <<< 6 ||| (second &&& 0x3F) + + {:ok, {:opaque, <>}} + else + _ -> {:error, :wv_datetime_format} + end + end + + # Length 15: "YYYYMMDDThhmmss"; length 16: same plus a time-zone letter. + defp split_wv_datetime(<>), + do: {:ok, date <> time, 0} + + defp split_wv_datetime(<>) + when tz >= ?A and tz <= ?Z and tz != ?J, + do: {:ok, date <> time, tz} + + defp split_wv_datetime(_text), do: :error + + defp all_digits?(digits), do: String.match?(digits, ~r/\A[0-9]*\z/) +end diff --git a/lib/libwbxml/parser.ex b/lib/libwbxml/parser.ex new file mode 100644 index 0000000..5b86942 --- /dev/null +++ b/lib/libwbxml/parser.ex @@ -0,0 +1,864 @@ +defmodule Libwbxml.Parser do + @moduledoc """ + WBXML parser: turns a WBXML binary into a `Libwbxml.Tree`. + + Function-by-function port of upstream `wbxml_parser.c` (libwbxml 0.11.10) + driving the tree callbacks ported in `Libwbxml.Parser.TreeBuilder`. The + parser is total: every malformed input yields `{:error, reason}` and nothing + ever raises. + + ## Header + + * The version byte is stored but never validated (upstream only logs a + warning for versions above 1.3). WBXML 1.0 documents have no charset + field. + * The public ID is an `mb_u_int32` token, or `0x00` followed by a string + table index that is resolved after the string table has been read. + * A charset of `0` means `opts.charset` if given, else UTF-8; any other + value must be one of the 15 charsets in `Libwbxml.Charset` + (`:charset_not_found` otherwise). + * A string table whose last byte is not `0` gets four `0` bytes appended. + * `opts.language` forces the language and the document's public ID is then + ignored. Otherwise the public ID selects the language; an unknown one is + `:unknown_public_id`. + + ## Body (best-effort mode, as upstream is compiled) + + * Unknown tag and attribute-start tokens become a literal element/attribute + named `unknown`; unknown attribute-value tokens are an error. + * `SWITCH_PAGE` keeps separate tag and attribute code pages; a stray + `SWITCH_PAGE` in element content is tolerated (Nokia 6600 work-around). + * Extension tokens are only meaningful for WML/WTA (variable references, + rendered as `$(name:escape)` etc.) and Wireless Village (`EXT_T_0` with + an extension-value token); in every other language the token byte is + silently skipped and parsing continues with the next byte. + * `ENTITY` codes are written with upstream's home-grown UTF-8 scheme (up to + six bytes, no validation beyond rejecting codes >= 0x80000000). It is + only correct up to U+FFFF; see `entity_to_utf8/1`. + * `OPAQUE` content is decoded per language: WV integers and datetimes, + DRMREL `ds:KeyValue` and SyncML `NextNonce` to base64, OTA attribute + values to base64. Embedded SyncML DevInf/DDF documents are parsed into + `Libwbxml.Tree.SubTree` nodes by the tree builder. + * SI `created`/`si-expires` and EMN `timestamp` attribute values are + decoded as OMA datetimes. + * Processing instructions are parsed but not kept, and any bytes after the + root element (other than PIs) are ignored, as upstream. + * A string table reference with no string table and index `0` yields + `xmlns` (upstream's Nokia work-around). + + Strings are converted from the document charset with + `Libwbxml.Charset.to_utf8/2`, which (unlike the iconv-less upstream build) + also handles ISO-8859-1, UTF-16 and UCS-2. + """ + + import Bitwise + + alias Libwbxml.{Base64, Charset, Opaque, Tables, Tree} + alias Libwbxml.Parser.TreeBuilder + alias Libwbxml.Tables.Language + alias Libwbxml.Tree.Attribute + + # Global tokens (wbxml_internals.h) + @switch_page 0x00 + @end_token 0x01 + @entity 0x02 + @str_i 0x03 + @literal 0x04 + @ext_i_0 0x40 + @ext_i_1 0x41 + @ext_i_2 0x42 + @pi 0x43 + @literal_c 0x44 + @ext_t_0 0x80 + @ext_t_1 0x81 + @ext_t_2 0x82 + @str_t 0x83 + @literal_a 0x84 + @ext_0 0xC0 + @ext_1 0xC1 + @ext_2 0xC2 + @opaque_token 0xC3 + @literal_ac 0xC4 + + @ext_tokens [@ext_i_0, @ext_i_1, @ext_i_2, @ext_t_0, @ext_t_1, @ext_t_2, @ext_0, @ext_1, @ext_2] + @literal_tokens [@literal, @literal_a, @literal_c, @literal_ac] + + @token_mask 0x3F + @with_content 0x40 + @with_attrs 0x80 + + @public_id_unknown 0x01 + @version_10 0x00 + @default_charset 106 + @unknown_name "unknown" + + # WML variable substitution (parse_extension) + @var_begin "$(" + @var_end ")" + @wml_langs [:wml10, :wml11, :wml12, :wml13, :wtawml12] + @wv_langs [:wv_csp11, :wv_csp12] + @syncml_langs [:syncml10, :syncml11, :syncml12] + + # Wireless Village opaque data types by {code page, token} (decode_wv_content). + @wv_integers [ + {0x00, 0x0B}, + {0x00, 0x0F}, + {0x00, 0x1A}, + {0x00, 0x3C}, + {0x01, 0x1C}, + {0x01, 0x25}, + {0x01, 0x26}, + {0x01, 0x27}, + {0x01, 0x28}, + {0x01, 0x32}, + {0x03, 0x05}, + {0x03, 0x06}, + {0x03, 0x0C}, + {0x03, 0x0D}, + {0x03, 0x0E}, + {0x03, 0x12}, + {0x03, 0x13}, + {0x05, 0x05}, + {0x05, 0x09}, + {0x05, 0x32}, + {0x09, 0x08}, + {0x09, 0x0A} + ] + @wv_datetimes [{0x00, 0x11}, {0x06, 0x1A}] + + defmodule State do + @moduledoc false + # The mutable fields of upstream's `WBXMLParser`, threaded through the + # parse functions. `rest` replaces `pos`. + defstruct rest: <<>>, + version: 0, + public_id: 0x01, + public_id_index: nil, + charset: 0, + meta_charset: nil, + strtbl: nil, + lang: nil, + lang_forced: nil, + current_tag: nil, + tag_page: 0, + attr_page: 0, + builder: nil + end + + @type reason :: Libwbxml.Error.reason() + + @typedoc """ + Parser options: `:language` forces the language (`nil` detects it from the + public ID); `:charset` is the MIBenum to assume when the document declares + none (`nil` means UTF-8). Other keys are ignored. + """ + @type opts :: %{ + optional(:language) => atom() | nil, + optional(:charset) => non_neg_integer() | nil + } + + @doc """ + Parses a WBXML document with the language detected from its public ID and + UTF-8 as the fallback charset. Same as `parse(wbxml, %{})`. + """ + @spec parse(binary()) :: {:ok, Tree.t()} | {:error, reason()} + def parse(wbxml), do: parse(wbxml, %{}) + + @doc """ + Parses a WBXML document into a `Libwbxml.Tree`. + + `opts` is the validated option map of `Libwbxml.decode/2` (see `t:opts/0`). + An empty binary is `{:error, :bad_parameter}`, as upstream's converter + rejects it before the parser (whose own `:empty_wbxml` is thus never seen). + + iex> {:ok, tree} = Libwbxml.Parser.parse(<<0x03, 0x01, 0x6A, 0x00, 0x00, 0x0D, 0x45, 0x00, 0x00, 0x4E, 0x03, ?1, 0x00, 0x01, 0x01>>, %{language: :activesync}) + iex> Libwbxml.Tree.element_name(tree.root) + "Ping" + """ + @spec parse(binary(), opts()) :: {:ok, Tree.t()} | {:error, reason()} + def parse(wbxml, opts) when is_binary(wbxml) and is_map(opts) do + if wbxml == <<>> do + {:error, :bad_parameter} + else + state = %State{ + rest: wbxml, + lang_forced: Map.get(opts, :language), + meta_charset: Map.get(opts, :charset) + } + + try do + {:ok, do_parse(state)} + catch + {:wbxml_error, reason} -> {:error, reason} + end + end + end + + # wbxml_parser_parse() + defp do_parse(state) do + state = + state + |> parse_version() + |> parse_publicid() + |> parse_charset() + |> parse_strtbl() + |> check_public_id() + + builder = TreeBuilder.new(state.lang.lang, state.charset) + state = parse_body(%{state | builder: builder}) + unwrap(TreeBuilder.finish(state.builder)) + end + + ## Public helpers + + @doc """ + Decodes a WBXML multi-byte unsigned integer from the start of `binary`. + + As upstream, at most five bytes are read (`:unvalid_mbuint32` if the fifth + still has its continuation bit), the accumulator is 32 bits wide (larger + values wrap silently) and running out of bytes is `:end_of_buffer`. + + iex> Libwbxml.Parser.decode_mb_uint32(<<0x84, 0x80, 0x01, 0xFF>>) + {:ok, 65537, <<0xFF>>} + iex> Libwbxml.Parser.decode_mb_uint32(<<0x80, 0x80>>) + {:error, :end_of_buffer} + """ + @spec decode_mb_uint32(binary()) :: + {:ok, non_neg_integer(), binary()} | {:error, :end_of_buffer | :unvalid_mbuint32} + def decode_mb_uint32(binary) when is_binary(binary), do: decode_mb_uint32(binary, 0, 0) + + defp decode_mb_uint32(_binary, _acc, 5), do: {:error, :unvalid_mbuint32} + + defp decode_mb_uint32(<>, acc, count) do + acc = (acc <<< 7 ||| (byte &&& 0x7F)) &&& 0xFFFFFFFF + + if (byte &&& 0x80) == 0, + do: {:ok, acc, rest}, + else: decode_mb_uint32(rest, acc, count + 1) + end + + defp decode_mb_uint32(<<>>, _acc, _count), do: {:error, :end_of_buffer} + + @doc """ + Encodes an `ENTITY` code as UTF-8 the way `parse_entity` does: codes below + 0x80 are one byte (code 0 gives the empty string), larger codes use the + original up-to-six-byte UTF-8 scheme without any validity check, and codes + at or above 0x80000000 are `:invalid_unicode`. + + NOTE(upstream-quirk): upstream emits continuation bytes only while the + remaining code is >= 0x40, then ORs the rest into the lead-byte mask for + that byte count. That is correct up to U+FFFF but produces invalid bytes + for code points whose top bits do not fit, e.g. U+1F600 becomes + `FF 98 80`. Reproduced as is. + + iex> Libwbxml.Parser.entity_to_utf8(0xE9) + {:ok, "é"} + iex> Libwbxml.Parser.entity_to_utf8(0x1F600) + {:ok, <<0xFF, 0x98, 0x80>>} + iex> Libwbxml.Parser.entity_to_utf8(0x80000000) + {:error, :invalid_unicode} + """ + @spec entity_to_utf8(non_neg_integer()) :: {:ok, binary()} | {:error, :invalid_unicode} + def entity_to_utf8(code) when is_integer(code) and code >= 0x80000000, + do: {:error, :invalid_unicode} + + def entity_to_utf8(0), do: {:ok, <<>>} + def entity_to_utf8(code) when is_integer(code) and code < 0x80, do: {:ok, <>} + + def entity_to_utf8(code) when is_integer(code) and code >= 0 do + {:ok, utf8_tail(code, <<>>, 0)} + end + + @utf8_masks {0xFC, 0xF8, 0xF0, 0xE0, 0xC0} + + defp utf8_tail(code, tail, count) when code >= 0x40, + do: utf8_tail(code >>> 6, <<0x80 ||| (code &&& 0x3F), tail::binary>>, count + 1) + + defp utf8_tail(code, tail, count), + do: <> + + @doc """ + The Wireless Village data type of the opaque content of the tag at + `{page, token}` (`decode_wv_content`): `:integer`, `:datetime` or + `:string`. + """ + @spec wv_data_type(byte(), byte()) :: :integer | :datetime | :string + def wv_data_type(page, token) do + cond do + {page, token} in @wv_integers -> :integer + {page, token} in @wv_datetimes -> :datetime + true -> :string + end + end + + @doc """ + Language-specific decoding of `OPAQUE` element content + (`decode_opaque_content`). `current_tag` is the tag entry of the element + whose content this is (`nil` when unknown, literal, or after a child + element, as upstream resets it). + + * WV-CSP: integers and datetimes per `wv_data_type/2`, else unchanged. + * DRMREL `ds:KeyValue` (page 0, token 0x0C) and SyncML `NextNonce` (page + 1, token 0x10): base64 (`:b64_enc` when empty). + * everything else: unchanged. + """ + @spec decode_opaque_content(atom(), map() | nil, binary()) :: + {:ok, binary()} | {:error, reason()} + def decode_opaque_content(lang, current_tag, data) when is_binary(data) do + case lang do + l when l in @wv_langs -> + decode_wv_content(current_tag, data) + + :drmrel10 -> + if match?(%{page: 0x00, token: 0x0C}, current_tag), + do: base64_value(data), + else: {:ok, data} + + l when l in @syncml_langs -> + if match?(%{page: 0x01, token: 0x10}, current_tag), + do: base64_value(data), + else: {:ok, data} + + _other -> + {:ok, data} + end + end + + @doc """ + Language-specific decoding of an `OPAQUE` attribute value + (`decode_opaque_attr_value`): OTA Settings values (Nokia icons) are + base64-encoded (`:b64_enc` when empty); everything else is unchanged. + """ + @spec decode_opaque_attr_value(atom(), binary()) :: {:ok, binary()} | {:error, reason()} + def decode_opaque_attr_value(:ota_settings, data) when is_binary(data), do: base64_value(data) + def decode_opaque_attr_value(_lang, data) when is_binary(data), do: {:ok, data} + + defp decode_wv_content(nil, data), do: {:ok, data} + + defp decode_wv_content(%{page: page, token: token}, data) do + case wv_data_type(page, token) do + :integer -> Opaque.decode_wv_integer(data) + :datetime -> Opaque.decode_wv_datetime(data) + :string -> {:ok, data} + end + end + + # decode_base64_value(): wbxml_base64_encode() returns NULL for empty input. + defp base64_value(<<>>), do: {:error, :b64_enc} + defp base64_value(data), do: {:ok, Base64.encode(data)} + + ## Errors + + defp fail(reason), do: throw({:wbxml_error, reason}) + + defp unwrap({:ok, value}), do: value + defp unwrap({:error, reason}), do: fail(reason) + + ## Header + + # parse_version() + defp parse_version(state) do + {version, state} = uint8(state) + %{state | version: version} + end + + # parse_publicid(): publicid = mb_u_int32 | ( zero index ) + defp parse_publicid(%State{rest: <<0x00, rest::binary>>} = state) do + {index, state} = mb_uint32(%{state | rest: rest}) + # The index lands in a signed 32-bit field upstream; only -1 means "none". + %{state | public_id_index: if(index == 0xFFFFFFFF, do: nil, else: index)} + end + + defp parse_publicid(%State{rest: <<_, _::binary>>} = state) do + {public_id, state} = mb_uint32(state) + %{state | public_id: public_id} + end + + defp parse_publicid(_state), do: fail(:end_of_buffer) + + # parse_charset() for WBXML >= 1.1, then the wbxml_parser_parse() fallback + # for documents that still have no charset (WBXML 1.0). + defp parse_charset(%State{version: @version_10} = state) do + %{state | charset: state.meta_charset || @default_charset} + end + + defp parse_charset(state) do + {charset, state} = mb_uint32(state) + charset = if charset == 0, do: state.meta_charset || @default_charset, else: charset + + case Charset.name(charset) do + {:ok, _name} -> %{state | charset: charset} + :error -> fail(:charset_not_found) + end + end + + # parse_strtbl(): strtbl = length *byte + defp parse_strtbl(%State{rest: rest} = state) do + case decode_mb_uint32(rest) do + # Any failure to read the length is reported as end of buffer upstream. + {:error, _reason} -> + fail(:end_of_buffer) + + {:ok, 0, rest} -> + %{state | rest: rest} + + {:ok, len, rest} when len > byte_size(rest) -> + fail(:strtbl_length) + + {:ok, len, rest} -> + <> = rest + %{state | strtbl: terminate_strtbl(table), rest: rest} + end + end + + # "Some phones doesn't terminate the String Table with a null char" + defp terminate_strtbl(table) do + if :binary.last(table) == 0, do: table, else: table <> <<0, 0, 0, 0>> + end + + # check_public_id(). Case 1: the forced language wins whatever the document + # says (an unknown forced language falls through to the document's public + # ID, as upstream's main-table scan simply finds nothing). + defp check_public_id(%State{lang_forced: lang} = state) when lang != nil do + case Tables.get(lang) do + %Language{} = table -> %{state | lang: table} + nil -> check_public_id(%{state | lang_forced: nil}) + end + end + + defp check_public_id(%State{public_id: public_id} = state) + when public_id != @public_id_unknown do + case Tables.get_by_wbxml_public_id(public_id) do + %Language{} = lang -> %{state | lang: lang} + nil -> fail(:unknown_public_id) + end + end + + defp check_public_id(%State{public_id_index: index} = state) when index != nil do + with {:ok, public_id} <- strtbl_reference(state, index), + %Language{} = lang <- Tables.get_by_xml_public_id(public_id) do + %{state | lang: lang} + else + _ -> fail(:unknown_public_id) + end + end + + defp check_public_id(_state), do: fail(:unknown_public_id) + + ## Body + + # parse_body(): body = *pi element *pi + defp parse_body(state) do + state |> parse_pis() |> parse_element() |> parse_pis() + end + + defp parse_pis(%State{rest: <<@pi, _::binary>>} = state), do: state |> parse_pi() |> parse_pis() + defp parse_pis(state), do: state + + # parse_pi(): pi = PI attrStart *attrValue END. The tree callback for PIs is + # a no-op upstream, so the PI is parsed (for its errors) and dropped. + defp parse_pi(state) do + state = skip(state, 1) + {_name, prefix, state} = parse_attr_start(state) + {_value, state} = parse_pi_values(state, [prefix || ""]) + skip(state, 1) + end + + defp parse_pi_values(%State{rest: <<@end_token, _::binary>>} = state, acc), + do: {IO.iodata_to_binary(acc), state} + + defp parse_pi_values(state, acc) do + {value, state} = parse_attr_value(state) + parse_pi_values(state, [acc, value || ""]) + end + + # parse_element(): element = ([switchPage] stag) [ 1*attribute END ] [ *content END ] + defp parse_element(state) do + state = maybe_switch_page(state, :tag) + {tag, name, state} = parse_stag(state) + + state = + case name do + {:token, entry} -> %{state | current_tag: entry} + {:literal, _} -> state + end + + {attrs, state} = + if (tag &&& @with_attrs) != 0, do: parse_attributes(state, []), else: {[], state} + + state = builder(state, &TreeBuilder.start_element(&1, name, attrs)) + + state = + if (tag &&& @with_content) != 0, do: parse_contents(state), else: state + + state = builder(state, &TreeBuilder.end_element/1) + %{state | current_tag: nil} + end + + # There must be at least one attribute, then attributes until END. + defp parse_attributes(state, acc) do + {attr, state} = parse_attribute(state) + acc = [attr | acc] + + case state.rest do + <<@end_token, rest::binary>> -> {Enum.reverse(acc), %{state | rest: rest}} + _ -> parse_attributes(state, acc) + end + end + + # *content END; text reaches the tree only when non-empty. + defp parse_contents(%State{rest: <<@end_token, rest::binary>>} = state), + do: %{state | rest: rest} + + defp parse_contents(state) do + {content, state} = parse_content(state) + + state = + case content do + nil -> state + <<>> -> state + text -> characters(state, text) + end + + parse_contents(state) + end + + defp characters(%State{charset: charset} = state, text) do + parse_embedded = fn bytes -> parse(bytes, %{language: nil, charset: charset}) end + builder(state, &TreeBuilder.characters(&1, text, parse_embedded)) + end + + defp builder(%State{builder: builder} = state, fun) do + %{state | builder: unwrap(fun.(builder))} + end + + # parse_switch_page(): switchPage = SWITCH_PAGE pageindex + defp maybe_switch_page(%State{rest: <<@switch_page, _::binary>>} = state, space), + do: parse_switch_page(state, space) + + defp maybe_switch_page(state, _space), do: state + + defp parse_switch_page(state, space) do + {page, state} = state |> skip(1) |> uint8() + + case space do + :tag -> %{state | tag_page: page} + :attr -> %{state | attr_page: page} + end + end + + # parse_stag(): stag = TAG | (literalTag index) + defp parse_stag(%State{rest: <>} = state) when token in @literal_tokens do + {mask, name, state} = parse_literal(state) + {mask, {:literal, name}, state} + end + + defp parse_stag(state), do: parse_tag(state) + + # parse_tag(): unknown tokens give a literal "unknown" element (best effort). + defp parse_tag(state) do + {tag, state} = uint8(state) + %Language{} = lang = state.lang + if lang.tags == [], do: fail(:tag_table_undefined) + + name = + case Tables.tag_from_token(lang, state.tag_page, tag &&& @token_mask) do + nil -> {:literal, @unknown_name} + entry -> {:token, entry} + end + + {tag, name, state} + end + + # parse_attribute(): attribute = attrStart *attrValue + defp parse_attribute(state) do + {name, prefix, state} = parse_attr_start(state) + {value, state} = parse_attr_values(state, [prefix || ""]) + value = decode_attr_value(state.lang.lang, name, value) + {%Attribute{name: name, value: value}, state} + end + + defp parse_attr_values(state, acc) do + if attr_value?(state) do + {value, state} = parse_attr_value(state) + parse_attr_values(state, [acc, value || ""]) + else + {IO.iodata_to_binary(acc), state} + end + end + + # SI 1.0 'created'/'si-expires' and EMN 1.0 'timestamp' carry OMA datetimes. + defp decode_attr_value(_lang, _name, <<>>), do: <<>> + + defp decode_attr_value(:si10, {:token, %{page: 0x00, token: token}}, value) + when token in [0x0A, 0x10], + do: unwrap(Opaque.decode_datetime(value)) + + defp decode_attr_value(:emn10, {:token, %{page: 0x00, token: 0x05}}, value), + do: unwrap(Opaque.decode_datetime(value)) + + defp decode_attr_value(_lang, _name, value), do: value + + # is_attr_value(): attrValue = ([switchPage] ATTRVALUE | string | extension | entity | opaque) + defp attr_value?(%State{rest: rest} = state) do + case rest do + <<>> -> false + <<@switch_page, _, next, _::binary>> when (next &&& 0x80) == 0x80 -> true + <<@switch_page, _, _, _::binary>> -> extension?(state) + <<@switch_page, _::binary>> -> false + <> when (byte &&& 0x80) == 0x80 -> true + <> when byte in [@str_i, @str_t, @entity, @opaque_token] -> true + _ -> extension?(state) + end + end + + # is_extension(): looks past a SWITCH_PAGE (needs the byte at pos + 2). + defp extension?(%State{rest: rest}) do + case rest do + <<@switch_page, _, byte, _::binary>> -> byte in @ext_tokens + <<@switch_page, _::binary>> -> false + <> -> byte in @ext_tokens + <<>> -> false + end + end + + # parse_content(): content = element | string | extension | entity | pi | opaque + defp parse_content(%State{rest: <<>>}), do: fail(:end_of_buffer) + + defp parse_content(%State{rest: <>} = state) do + cond do + extension?(state) -> + parse_extension(state, :tag) + + byte == @entity -> + parse_entity(state) + + byte in [@str_i, @str_t] -> + parse_string(state) + + byte == @opaque_token -> + {data, state} = parse_opaque(state) + {unwrap(decode_opaque_content(state.lang.lang, state.current_tag, data)), state} + + byte == @pi -> + {nil, parse_pi(state)} + + # Nokia 6600 bug: switch pages in wrong places. + byte == @switch_page -> + {nil, parse_switch_page(state, :tag)} + + true -> + {nil, parse_element(state)} + end + end + + # parse_string(): string = inline | tableref + defp parse_string(%State{rest: <<@str_i, rest::binary>>} = state), + do: parse_termstr(%{state | rest: rest}) + + defp parse_string(%State{rest: <<@str_t, rest::binary>>} = state) do + {index, state} = mb_uint32(%{state | rest: rest}) + {unwrap(strtbl_reference(state, index)), state} + end + + defp parse_string(_state), do: fail(:string_expected) + + # parse_extension(): extension = [switchPage] (( EXT_I termstr ) | ( EXT_T index ) | EXT) + defp parse_extension(state, space) do + state = maybe_switch_page(state, space) + {token, state} = uint8(state) + + case state.lang.lang do + lang when lang in @wml_langs -> parse_wml_extension(state, token) + lang when lang in @wv_langs -> parse_wv_extension(state, token) + # "Extension tokens not allowed with this Document": the token is skipped. + _other -> {nil, state} + end + end + + # WML variable substitution: $(name), $(name:escape), $(name:unesc), $(name:noesc) + defp parse_wml_extension(state, token) do + {variable, state} = + case token do + t when t in [@ext_0, @ext_1, @ext_2] -> + {nil, state} + + t when t in [@ext_i_0, @ext_i_1, @ext_i_2] -> + parse_termstr(state) + + t when t in [@ext_t_0, @ext_t_1, @ext_t_2] -> + {index, state} = mb_uint32(state) + {unwrap(strtbl_reference(state, index)), state} + + _ -> + fail(:unknown_extension_token) + end + + case variable do + nil -> + {nil, state} + + _ -> + suffix = + case token do + t when t in [@ext_i_0, @ext_t_0] -> ":escape" + t when t in [@ext_i_1, @ext_t_1] -> ":unesc" + t when t in [@ext_i_2, @ext_t_2] -> ":noesc" + end + + {@var_begin <> variable <> suffix <> @var_end, state} + end + end + + # Wireless Village: only EXT_T_0 carries an extension-value token. + defp parse_wv_extension(state, @ext_t_0) do + {value, state} = mb_uint32(state) + if state.lang.ext_values == [], do: fail(:ext_value_table_undefined) + + case Tables.ext_from_token(state.lang, value) do + nil -> {nil, state} + %{value: text} -> {text, state} + end + end + + defp parse_wv_extension(state, _token), do: {nil, state} + + # parse_entity(): entity = ENTITY entcode + defp parse_entity(state) do + {code, state} = state |> skip(1) |> mb_uint32() + {unwrap(entity_to_utf8(code)), state} + end + + # parse_opaque(): opaque = OPAQUE length *byte + defp parse_opaque(state) do + {len, state} = state |> skip(1) |> mb_uint32() + + case state.rest do + <> -> {data, %{state | rest: rest}} + _ -> fail(:bad_opaque_length) + end + end + + # parse_literal(): ( literalTag index ), returning the tag mask and the name. + defp parse_literal(state) do + {token, state} = uint8(state) + {index, state} = mb_uint32(state) + name = unwrap(strtbl_reference(state, index)) + + mask = + case token do + @literal -> @token_mask + @literal_c -> @with_content + @literal_a -> @with_attrs + @literal_ac -> @with_content ||| @with_attrs + _ -> fail(:internal) + end + + {mask, name, state} + end + + # parse_attr_start(): attrStart = ([switchPage] ATTRSTART) | ( LITERAL index ) + defp parse_attr_start(%State{rest: <<@literal, _::binary>>} = state) do + {_mask, name, state} = parse_literal(state) + {{:literal, name}, nil, state} + end + + defp parse_attr_start(state) do + state = maybe_switch_page(state, :attr) + {token, state} = uint8(state) + %Language{} = lang = state.lang + if lang.attrs == [], do: fail(:attr_table_undefined) + + case Tables.attr_from_token(lang, state.attr_page, token) do + nil -> {{:literal, @unknown_name}, nil, state} + entry -> {{:token, entry}, entry.value_prefix, state} + end + end + + # parse_attr_value(): attrValue = ([switchPage] ATTRVALUE) | string | extension | entity | opaque + defp parse_attr_value(%State{rest: rest} = state) do + if extension?(state) do + parse_extension(state, :attr) + else + case rest do + <<@entity, _::binary>> -> + parse_entity(state) + + <> when byte in [@str_i, @str_t] -> + parse_string(state) + + <<@opaque_token, _::binary>> -> + {data, state} = parse_opaque(state) + {unwrap(decode_opaque_attr_value(state.lang.lang, data)), state} + + _ -> + parse_attr_value_token(state) + end + end + end + + defp parse_attr_value_token(state) do + state = maybe_switch_page(state, :attr) + {token, state} = uint8(state) + %Language{} = lang = state.lang + if lang.attr_values == [], do: fail(:attr_value_table_undefined) + + case Tables.attr_value_from_token(lang, state.attr_page, token) do + nil -> fail(:unknown_attr_value) + %{value: value} -> {value, state} + end + end + + # parse_termstr(): a NUL-terminated string in the document charset. + defp parse_termstr(%State{rest: rest, charset: charset} = state) do + {bytes, rest} = split_terminated(rest, charset) + {unwrap(Charset.to_utf8(bytes, charset)), %{state | rest: rest}} + end + + defp split_terminated(binary, charset) do + case Charset.split_terminated(binary, charset) do + {:ok, bytes, rest} -> {bytes, rest} + {:error, reason} -> fail(reason) + end + end + + # get_strtbl_reference() + defp strtbl_reference(%State{strtbl: nil}, 0) do + # Nokia work-around: no string table and index 0 means "xmlns". + {:ok, "xmlns"} + end + + defp strtbl_reference(%State{strtbl: nil}, _index), do: {:error, :null_string_table} + + defp strtbl_reference(%State{strtbl: strtbl, charset: charset}, index) do + if index >= byte_size(strtbl) do + {:error, :invalid_strtbl_index} + else + tail = binary_part(strtbl, index, byte_size(strtbl) - index) + + with {:ok, bytes, _rest} <- Charset.split_terminated(tail, charset) do + Charset.to_utf8(bytes, charset) + end + end + end + + ## Basic types + + # parse_uint8() + defp uint8(%State{rest: <>} = state), do: {byte, %{state | rest: rest}} + defp uint8(_state), do: fail(:end_of_buffer) + + # parse_mb_uint32() + defp mb_uint32(%State{rest: rest} = state) do + case decode_mb_uint32(rest) do + {:ok, value, rest} -> {value, %{state | rest: rest}} + {:error, reason} -> fail(reason) + end + end + + # Skips `n` bytes already known to be present. + defp skip(%State{rest: rest} = state, n) do + <<_::binary-size(^n), rest::binary>> = rest + %{state | rest: rest} + end +end diff --git a/lib/libwbxml/parser/tree_builder.ex b/lib/libwbxml/parser/tree_builder.ex new file mode 100644 index 0000000..9f5b230 --- /dev/null +++ b/lib/libwbxml/parser/tree_builder.ex @@ -0,0 +1,170 @@ +defmodule Libwbxml.Parser.TreeBuilder do + @moduledoc """ + Builds a `Libwbxml.Tree` from the events `Libwbxml.Parser` emits. + + Port of the parser callbacks in upstream `wbxml_tree_clb_wbxml.c` together + with the node-insertion rule of `wbxml_tree_add_node` (libwbxml 0.11.10). + Upstream keeps a `current` pointer into a mutable tree; here the open nodes + form a stack of frames whose top is the node `current` points at, and a + frame is turned into a `Libwbxml.Tree.Element` / `Libwbxml.Tree.CData` when + it is popped. + + Behaviour reproduced from upstream: + + * `start_element/3` adds the element under the current node and makes it + current. + * `characters/3` first classifies the current node with + `Libwbxml.Tree.syncml_data_type/2` (this runs for every language, the + check is purely name based): an embedded WBXML document is parsed with the + function given as third argument and added as a `SubTree` (or as text if + that fails); vObject-like content opens a `CData` node, which becomes the + current node, and the text goes inside it; anything else is a plain text + node. A text node added right after another text node is merged into it. + * `end_element/1` pops the current node — twice when the current node is a + `CData` (the CDATA section is assumed to end with its element) — and does + nothing at all for the root element. Because a second `characters` call + inside an open `CData` opens *another* `CData` inside it, this faithfully + reproduces upstream's mis-nesting for multi-part vObject data. + * Processing instructions are dropped (`wbxml_tree_clb_wbxml_pi` is a + no-op). + + All functions return `{:ok, builder}` / `{:error, :internal}` where upstream + sets `tree_ctx->error`. + """ + + alias Libwbxml.Tree + alias Libwbxml.Tree.{CData, Element, SubTree, Text} + + defstruct stack: [], root: nil, lang: nil, charset: nil + + @typedoc "An open element (`{:element, name, attrs, children_reversed}`) or CDATA node." + @type frame :: + {:element, Tree.name(), [Tree.Attribute.t()], [Tree.tree_node()]} + | {:cdata, [Tree.tree_node()]} + + @type t :: %__MODULE__{ + stack: [frame()], + root: Element.t() | nil, + lang: atom() | nil, + charset: non_neg_integer() | nil + } + + @typedoc "Parser for embedded WBXML documents (SyncML DevInf / DDF data)." + @type embedded_parser :: (binary() -> {:ok, Tree.t()} | {:error, term()}) + + @cdata_types [:clear, :directory_vcard, :vcalendar, :vcard, :vobject] + + @doc """ + Starts a document (`wbxml_tree_clb_wbxml_start_document`): records the + language and the charset the document was parsed with. + """ + @spec new(atom(), non_neg_integer()) :: t() + def new(lang, charset), do: %__MODULE__{lang: lang, charset: charset} + + @doc """ + Opens an element with its (already parsed) attributes. + """ + @spec start_element(t(), Tree.name(), [Tree.Attribute.t()]) :: {:ok, t()} | {:error, :internal} + def start_element(%__MODULE__{stack: [], root: root}, _name, _attrs) when root != nil do + # wbxml_tree_add_node() refuses a second root. + {:error, :internal} + end + + def start_element(%__MODULE__{} = builder, name, attrs) do + {:ok, push(builder, {:element, name, attrs, []})} + end + + @doc """ + Adds character data to the current node, see the module documentation. + `parse_embedded` is called with the bytes when the current `Data` element + carries an embedded WBXML document. + """ + @spec characters(t(), binary(), embedded_parser()) :: {:ok, t()} | {:error, :internal} + def characters(%__MODULE__{stack: []}, _text, _parse_embedded), do: {:error, :internal} + + def characters(%__MODULE__{} = builder, text, parse_embedded) when is_binary(text) do + case data_type(builder.stack) do + :wbxml -> + case parse_embedded.(text) do + {:ok, %Tree{} = tree} -> {:ok, add_child(builder, %SubTree{tree: tree})} + {:error, _reason} -> {:ok, add_child(builder, %Text{data: text})} + end + + type when type in @cdata_types -> + {:ok, builder |> push({:cdata, []}) |> add_child(%Text{data: text})} + + :normal -> + {:ok, add_child(builder, %Text{data: text})} + end + end + + @doc """ + Closes the current element. + """ + @spec end_element(t()) :: {:ok, t()} | {:error, :internal} + def end_element(%__MODULE__{stack: []}), do: {:error, :internal} + def end_element(%__MODULE__{stack: [_root]} = builder), do: {:ok, builder} + + def end_element(%__MODULE__{stack: [{:cdata, _} | _]} = builder), + do: {:ok, builder |> pop() |> pop()} + + def end_element(%__MODULE__{} = builder), do: {:ok, pop(builder)} + + @doc """ + Ends the document: closes whatever is still open and returns the tree. + """ + @spec finish(t()) :: {:ok, Tree.t()} | {:error, :internal} + def finish(%__MODULE__{stack: [], root: nil}), do: {:error, :internal} + + def finish(%__MODULE__{stack: [], root: root} = builder), + do: {:ok, %Tree{lang: builder.lang, orig_charset: builder.charset, root: root}} + + def finish(%__MODULE__{} = builder), do: builder |> pop() |> finish() + + ## Stack operations + + defp push(%__MODULE__{stack: stack} = builder, frame), do: %{builder | stack: [frame | stack]} + + # Closes the top frame and attaches it to its parent (`current = current->parent`). + defp pop(%__MODULE__{stack: [top]} = builder), do: %{builder | stack: [], root: finalize(top)} + + defp pop(%__MODULE__{stack: [top, parent | rest]} = builder), + do: %{builder | stack: [append(parent, finalize(top)) | rest]} + + defp add_child(%__MODULE__{stack: [top | rest]} = builder, node), + do: %{builder | stack: [append(top, node) | rest]} + + # wbxml_tree_add_node(): a text node following a text node is merged into it. + defp append({:element, name, attrs, children}, node), + do: {:element, name, attrs, merge_text(node, children)} + + defp append({:cdata, children}, node), do: {:cdata, merge_text(node, children)} + + defp merge_text(%Text{data: new}, [%Text{data: old} | rest]), + do: [%Text{data: old <> new} | rest] + + defp merge_text(node, children), do: [node | children] + + defp finalize({:element, name, attrs, children}), + do: %Element{name: name, attrs: attrs, children: Enum.reverse(children)} + + defp finalize({:cdata, children}), do: %CData{children: Enum.reverse(children)} + + ## SyncML data type of the current node + + # wbxml_tree_node_get_syncml_data_type(current): a CDATA node is judged by + # its parent; only an element named "Data" needs the (expensive) ancestor + # materialisation. + defp data_type([{:cdata, _} | rest]), do: element_data_type(rest) + defp data_type(stack), do: element_data_type(stack) + + defp element_data_type([{:element, name, _attrs, _children} = current | ancestors]) do + if Tree.element_name(name) == "Data" do + Tree.syncml_data_type(finalize(current), ancestors |> Enum.take(2) |> Enum.map(&finalize/1)) + else + :normal + end + end + + defp element_data_type(_other), do: :normal +end diff --git a/lib/libwbxml/tables.ex b/lib/libwbxml/tables.ex new file mode 100644 index 0000000..8bcd1db --- /dev/null +++ b/lib/libwbxml/tables.ex @@ -0,0 +1,447 @@ +defmodule Libwbxml.Tables do + @moduledoc """ + Lookup functions over the WBXML token tables, with the exact semantics of + `wbxml_tables.c` (libwbxml 0.11.10). + + The data itself was generated from upstream's `wbxml_tables.c` into + `Libwbxml.Tables.Generated.*` (one module per language; tables shared + between languages in C are shared here by delegation). This module is the + hand-written API over that data. + + All lookups take a `t:Libwbxml.Tables.Language.t/0` obtained from `get/1`, + `search/3` or `get_by_wbxml_public_id/1`. They return `nil` where C returns + `NULL`. + + Strings are compared byte-wise as in C; "case-insensitive" means ASCII + case folding (`strcasecmp` in the C locale). + """ + + alias Libwbxml.Tables.Generated.Index + alias Libwbxml.Tables.Language + + @typedoc "A supported language, mirroring the `WBXMLLanguage` enum." + @type lang :: + :wml10 + | :wml11 + | :wml12 + | :wml13 + | :wta10 + | :wtawml12 + | :channel11 + | :channel12 + | :si10 + | :sl10 + | :co10 + | :prov10 + | :emn10 + | :drmrel10 + | :ota_settings + | :syncml10 + | :devinf10 + | :syncml11 + | :devinf11 + | :metinf11 + | :syncml12 + | :devinf12 + | :metinf12 + | :dmddf12 + | :wv_csp11 + | :wv_csp12 + | :airsync + | :activesync + | :conml + + @typedoc """ + The root element given to `search/3`. Either the name as expat delivers it + with namespace processing on (`"uri|local"`, or just `"local"` when the + element has no namespace), or a `{uri, local}` tuple which is joined the + same way (`nil`/`""` uri means no namespace). + """ + @type root :: String.t() | {String.t() | nil, String.t()} + + @unknown_wbxml_public_id 0x01 + + # Language names accepted by the upstream `wbxml2xml -l` option (see + # tools/wbxml2xml_tool.c). Not part of the library proper, but handy for + # tooling and tests. + @cli_names %{ + "WML10" => :wml10, + "WML11" => :wml11, + "WML12" => :wml12, + "WML13" => :wml13, + "WTA10" => :wta10, + "WTAWML12" => :wtawml12, + "CHANNEL11" => :channel11, + "CHANNEL12" => :channel12, + "SI10" => :si10, + "SL10" => :sl10, + "CO10" => :co10, + "PROV10" => :prov10, + "EMN10" => :emn10, + "DRMREL10" => :drmrel10, + "OTA" => :ota_settings, + "SYNCML10" => :syncml10, + "DEVINF10" => :devinf10, + "SYNCML11" => :syncml11, + "DEVINF11" => :devinf11, + "METINF11" => :metinf11, + "SYNCML12" => :syncml12, + "DEVINF12" => :devinf12, + "METINF12" => :metinf12, + "DMDDF12" => :dmddf12, + "CSP11" => :wv_csp11, + "CSP12" => :wv_csp12, + "AIRSYNC" => :airsync, + "ACTIVESYNC" => :activesync, + "CONML" => :conml + } + @langs_by_cli_name Map.new(@cli_names, fn {name, lang} -> {lang, name} end) + + ## Language registry + + @doc """ + All supported languages, in `WBXMLLanguage` enum order. + """ + @spec languages() :: [lang()] + def languages, do: Index.languages() + + @doc """ + All supported languages in the order of C's main table (`sv_table_entry[]`). + + This is the order in which `search/3`, `get_by_wbxml_public_id/1` and + `get_by_xml_public_id/1` scan for the first match; it differs from + `languages/0` (SyncML 1.2 comes before 1.1 and 1.0, for instance). + """ + @spec main_table_order() :: [lang()] + def main_table_order, do: Enum.map(Index.main_table(), &elem(&1, 0)) + + @doc """ + The table for `lang` (`wbxml_tables_get_table`), or `nil` for an unknown + language. + """ + @spec get(atom()) :: Language.t() | nil + def get(lang) when is_atom(lang) do + case Index.module_by_lang() do + %{^lang => mod} -> Language.from_module(mod) + _ -> nil + end + end + + @doc """ + Like `get/1` but raises `ArgumentError` for an unknown language. + """ + @spec get!(atom()) :: Language.t() + def get!(lang) do + get(lang) || raise ArgumentError, "unknown WBXML language: #{inspect(lang)}" + end + + @doc """ + The WBXML public ID of `lang` (`wbxml_tables_get_wbxml_publicid`). + + Returns `0x01` (`WBXML_PUBLIC_ID_UNKNOWN`) when the language has no + registered WBXML public ID or is unknown, exactly as C does. + """ + @spec wbxml_public_id(atom()) :: pos_integer() + def wbxml_public_id(lang) when is_atom(lang) do + case Index.module_by_lang() do + %{^lang => mod} -> mod.public_id().wbxml_public_id || @unknown_wbxml_public_id + _ -> @unknown_wbxml_public_id + end + end + + @doc """ + The first language (in main-table order) whose WBXML public ID is + `public_id`, as the WBXML parser resolves a document's public ID. + + `0x01` means "unknown/no public ID" in WBXML and is never looked up (the C + parser skips the search in that case), so it returns `nil`. + """ + @spec get_by_wbxml_public_id(non_neg_integer()) :: Language.t() | nil + def get_by_wbxml_public_id(@unknown_wbxml_public_id), do: nil + + def get_by_wbxml_public_id(public_id) when is_integer(public_id) do + find_language(fn mod -> mod.public_id().wbxml_public_id == public_id end) + end + + @doc """ + The first language (in main-table order) whose XML public ID equals + `public_id`, ASCII case-insensitively. This is the lookup the WBXML parser + does when the public ID is a string-table reference, and stage one of + `search/3`. + """ + @spec get_by_xml_public_id(String.t()) :: Language.t() | nil + def get_by_xml_public_id(public_id) when is_binary(public_id) do + folded = ascii_downcase(public_id) + + find_language(fn mod -> + case mod.public_id().xml_public_id do + nil -> false + xml_public_id -> ascii_downcase(xml_public_id) == folded + end + end) + end + + @doc """ + Finds the language table for an XML document (`wbxml_tables_search_table`). + + Three stages, each scanning the main table in order and stopping at the + first hit; a stage is skipped when its argument is `nil`: + + 1. `public_id` compared ASCII case-insensitively with each language's XML + public ID (languages without one, i.e. OTA, never match). + 2. `system_id` compared exactly with each language's DTD (system ID). Note + that Channel 1.1's DTD is the empty string, so `""` matches it; pass + `nil` when the DOCTYPE has no system ID. + 3. `root`, the root element name as expat delivers it with namespace + processing (`"uri|local"`; see `t:root/0`). If it contains a `|`, the + language whose **first** namespace entry is an ASCII case-insensitive + *prefix* of the whole `"uri|local"` string wins (only the first + namespace entry is checked, because secondary code pages such as + `syncml:metinf` are not unique). Otherwise the bare name is compared + exactly with each language's root element. (C skips the root-element + scan entirely once a `|` is present, which is equivalent since no root + element contains `|`.) + + `wbxml_tree_clb_xml.c` calls this once from the DOCTYPE handler with + `(public_id, system_id, nil)` and, if that fails, from the first + start-element handler with `(nil, nil, root)`. + """ + @spec search(String.t() | nil, String.t() | nil, root() | nil) :: Language.t() | nil + def search(public_id, system_id, root) + when (is_binary(public_id) or is_nil(public_id)) and + (is_binary(system_id) or is_nil(system_id)) do + (public_id && get_by_xml_public_id(public_id)) || + (system_id && search_system_id(system_id)) || + (root && search_root(normalize_root(root))) + end + + defp search_system_id(system_id) do + find_language(fn mod -> mod.public_id().dtd == system_id end) + end + + defp search_root(root) do + if String.contains?(root, "|") do + folded = ascii_downcase(root) + + find_language(fn mod -> + case mod.namespaces() do + [%{uri: uri} | _] -> prefix?(ascii_downcase(uri), folded) + [] -> false + end + end) + else + find_language(fn mod -> mod.public_id().root_element == root end) + end + end + + defp normalize_root(root) when is_binary(root), do: root + defp normalize_root({nil, local}) when is_binary(local), do: local + defp normalize_root({"", local}) when is_binary(local), do: local + + defp normalize_root({uri, local}) when is_binary(uri) and is_binary(local), + do: uri <> "|" <> local + + defp find_language(pred) do + Enum.find_value(Index.main_table(), fn {_lang, mod} -> + if pred.(mod), do: Language.from_module(mod) + end) + end + + ## Tags + + @doc """ + Finds the tag entry named `name` (`wbxml_tables_get_tag_from_xml`). + + When `current_page` is a code page (not `nil`/negative), an entry in that + page is preferred; otherwise the first entry with that name in table order + is returned. Tag names may exist in several code pages (91 of them in + ActiveSync), so the current page decides which token is emitted. + """ + @spec tag_from_xml(Language.t(), integer() | nil, String.t()) :: Language.tag() | nil + def tag_from_xml(%Language{tag_by_name: by_name}, current_page, name) when is_binary(name) do + case by_name do + %{^name => entries} -> + if is_integer(current_page) and current_page >= 0 do + Enum.find(entries, &(&1.page == current_page)) || + Enum.find(entries, &(&1.page != current_page)) + else + hd(entries) + end + + _ -> + nil + end + end + + @doc """ + The tag entry for `token` in code page `page`: the first such entry in table + order, as the parser's linear scan finds it (AirSync/ActiveSync has one + duplicated pair, `{0x0E, 0x10}`). + """ + @spec tag_from_token(Language.t(), byte(), byte()) :: Language.tag() | nil + def tag_from_token(%Language{tag_by_token: by_token}, page, token) do + Map.get(by_token, {page, token}) + end + + ## Attributes + + @doc """ + Finds the attribute-start entry for `name`/`value` + (`wbxml_tables_get_attr_from_xml`). + + Returns `{entry, value_left}` or `nil` when no entry has that name. + `value_left` is the part of `value` still to be encoded after the token: + + * `nil` when an entry's `value_prefix` equals `value` exactly (or when + `value` is `nil` and the plain-name entry was found); + * the remainder after the longest `value_prefix` that is a strict prefix of + `value`, choosing the first entry in table order among equal lengths; + * the whole `value` when only the plain-name entry (`value_prefix: nil`) + matched. + + An exact match returns immediately, so an exact-match entry that appears + later in the table beats an earlier prefix. When `value` is `nil`, only the + plain-name entry can match. + """ + @spec attr_from_xml(Language.t(), String.t(), String.t() | nil) :: + {Language.attr(), String.t() | nil} | nil + def attr_from_xml(%Language{attr_by_name: by_name}, name, value) + when is_binary(name) and (is_binary(value) or is_nil(value)) do + case by_name do + %{^name => entries} -> attr_scan(entries, value, nil, 0) + _ -> nil + end + end + + defp attr_scan([], _value, nil, _found_len), do: nil + defp attr_scan([], value, found, found_len), do: {found, value_left(value, found_len)} + + defp attr_scan([%{value_prefix: nil} = entry | rest], value, found, found_len) do + if value == nil, + do: {entry, nil}, + else: attr_scan(rest, value, found || entry, found_len) + end + + defp attr_scan([%{value_prefix: prefix} = entry | rest], value, found, found_len) do + cond do + value == nil -> + attr_scan(rest, value, found, found_len) + + prefix == value -> + {entry, nil} + + byte_size(prefix) < byte_size(value) and found_len < byte_size(prefix) and + prefix?(prefix, value) -> + attr_scan(rest, value, entry, byte_size(prefix)) + + true -> + attr_scan(rest, value, found, found_len) + end + end + + defp value_left(nil, _len), do: nil + defp value_left(value, len), do: binary_part(value, len, byte_size(value) - len) + + @doc """ + The attribute-start entry for `token` in attribute code page `page` (first in + table order). Its `value_prefix`, when present, is the start of the + attribute value. + """ + @spec attr_from_token(Language.t(), byte(), byte()) :: Language.attr() | nil + def attr_from_token(%Language{attr_by_token: by_token}, page, token) do + Map.get(by_token, {page, token}) + end + + @doc """ + The attribute-value entry for `token` in attribute code page `page` (first + in table order). + """ + @spec attr_value_from_token(Language.t(), byte(), byte()) :: Language.attr_value() | nil + def attr_value_from_token(%Language{attr_value_by_token: by_token}, page, token) do + Map.get(by_token, {page, token}) + end + + @doc """ + Whether `value` contains any of the language's attribute values as a + substring (`wbxml_tables_contains_attr_value_from_xml`). Used by the encoder + to decide whether an attribute value needs tokenising. + """ + @spec contains_attr_value?(Language.t(), String.t()) :: boolean() + def contains_attr_value?(%Language{attr_values: attr_values}, value) when is_binary(value) do + Enum.any?(attr_values, fn %{value: v} -> String.contains?(value, v) end) + end + + ## Extension values + + @doc """ + The extension entry whose value equals `value` exactly + (`wbxml_tables_get_ext_from_xml`). + """ + @spec ext_from_xml(Language.t(), String.t()) :: Language.ext_value() | nil + def ext_from_xml(%Language{ext_values: ext_values}, value) when is_binary(value) do + Enum.find(ext_values, &(&1.value == value)) + end + + @doc """ + The extension entry for `token` (first in table order). Extension tokens + have no code page. + """ + @spec ext_from_token(Language.t(), byte()) :: Language.ext_value() | nil + def ext_from_token(%Language{ext_value_by_token: by_token}, token) do + Map.get(by_token, token) + end + + ## Namespaces + + @doc """ + The XML namespace URI bound to code page `page` (`wbxml_tables_get_xmlns`), + or `nil` when the language has no namespace for it. + """ + @spec xmlns_for_page(Language.t(), byte()) :: String.t() | nil + def xmlns_for_page(%Language{namespace_by_page: by_page}, page) do + case by_page do + %{^page => %{uri: uri}} -> uri + _ -> nil + end + end + + @doc """ + The code page bound to namespace `uri` (`wbxml_tables_get_code_page`), + compared exactly. + + Returns `0` when the namespace is unknown (or `nil`), as C does; the XML + reader relies on that fallback to code page 0. Use + `Language.page_by_namespace` directly to distinguish "unknown" from page 0. + """ + @spec page_for_xmlns(Language.t(), String.t() | nil) :: byte() + def page_for_xmlns(%Language{page_by_namespace: by_ns}, uri) do + case by_ns do + %{^uri => %{page: page}} -> page + _ -> 0 + end + end + + ## CLI names + + @doc """ + The language for an upstream tool name (`wbxml2xml -l NAME`), e.g. + `"ACTIVESYNC"`, `"CSP11"`, `"OTA"`; `nil` if unknown. + """ + @spec from_cli_name(String.t()) :: lang() | nil + def from_cli_name(name) when is_binary(name), do: Map.get(@cli_names, name) + + @doc """ + The upstream tool name for `lang` (inverse of `from_cli_name/1`). + """ + @spec cli_name(lang()) :: String.t() | nil + def cli_name(lang) when is_atom(lang), do: Map.get(@langs_by_cli_name, lang) + + ## Helpers + + defp ascii_downcase(s), do: String.downcase(s, :ascii) + + defp prefix?(prefix, string) do + size = byte_size(prefix) + byte_size(string) >= size and binary_part(string, 0, size) == prefix + end +end diff --git a/lib/libwbxml/tables/generated/activesync.ex b/lib/libwbxml/tables/generated/activesync.ex new file mode 100644 index 0000000..9586d36 --- /dev/null +++ b/lib/libwbxml/tables/generated/activesync.ex @@ -0,0 +1,76 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Activesync do + @moduledoc false + # WBXML token tables for language `:activesync` (WBXMLLanguage value 2402). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :activesync + def lang_id, do: 2402 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: "-//MICROSOFT//DTD ActiveSync//EN", + root_element: "ActiveSync", + dtd: "http://www.microsoft.com/" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.Airsync in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.Airsync + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.Airsync + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.Airsync + + @namespaces [ + %{uri: "AirSync:", page: 0x00}, + %{uri: "Contacts:", page: 0x01}, + %{uri: "Email:", page: 0x02}, + %{uri: "AirNotify:", page: 0x03}, + %{uri: "Calendar:", page: 0x04}, + %{uri: "Move:", page: 0x05}, + %{uri: "GetItemEstimate:", page: 0x06}, + %{uri: "FolderHierarchy:", page: 0x07}, + %{uri: "MeetingResponse:", page: 0x08}, + %{uri: "Tasks:", page: 0x09}, + %{uri: "ResolveRecipients:", page: 0x0A}, + %{uri: "ValidateCert:", page: 0x0B}, + %{uri: "Contacts2:", page: 0x0C}, + %{uri: "Ping:", page: 0x0D}, + %{uri: "Provision:", page: 0x0E}, + %{uri: "Search:", page: 0x0F}, + %{uri: "Gal:", page: 0x10}, + %{uri: "AirSyncBase:", page: 0x11}, + %{uri: "Settings:", page: 0x12}, + %{uri: "DocumentLibrary:", page: 0x13}, + %{uri: "ItemOperations:", page: 0x14}, + %{uri: "ComposeMail:", page: 0x15}, + %{uri: "Email2:", page: 0x16}, + %{uri: "Notes:", page: 0x17}, + %{uri: "RightsManagement:", page: 0x18}, + %{uri: "Find:", page: 0x19} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + # Shared with Libwbxml.Tables.Generated.Airsync in C. + defdelegate attrs(), to: Libwbxml.Tables.Generated.Airsync + defdelegate attr_by_token(), to: Libwbxml.Tables.Generated.Airsync + defdelegate attr_by_name(), to: Libwbxml.Tables.Generated.Airsync + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/airsync.ex b/lib/libwbxml/tables/generated/airsync.ex new file mode 100644 index 0000000..91735dc --- /dev/null +++ b/lib/libwbxml/tables/generated/airsync.ex @@ -0,0 +1,753 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Airsync do + @moduledoc false + # WBXML token tables for language `:airsync` (WBXMLLanguage value 2401). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :airsync + def lang_id, do: 2401 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: "-//AIRSYNC//DTD AirSync//EN", + root_element: "AirSync", + dtd: "http://www.microsoft.com/" + } + def public_id, do: @public_id + + @tags [ + %{name: "Sync", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "Responses", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "Add", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "Change", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "Delete", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "Fetch", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "SyncKey", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "ClientId", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "ServerId", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "Status", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "Collection", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "Class", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "Version", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "CollectionId", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "GetChanges", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "MoreAvailable", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "WindowSize", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "Commands", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "Options", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "FilterType", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "Truncation", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "RTFTruncation", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "Conflict", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "Collections", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "ApplicationData", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "DeletesAsMoves", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "NotifyGUID", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "Supported", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "SoftDelete", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "MIMESupport", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "MIMETruncation", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "Wait", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "Limit", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "Partial", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "ConversationMode", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "MaxItems", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "HeartbeatInterval", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "Anniversary", page: 0x01, token: 0x05, options: MapSet.new([])}, + %{name: "AssistantName", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "AssistantTelephoneNumber", page: 0x01, token: 0x07, options: MapSet.new([])}, + %{name: "Birthday", page: 0x01, token: 0x08, options: MapSet.new([])}, + %{name: "Body", page: 0x01, token: 0x09, options: MapSet.new([])}, + %{name: "BodySize", page: 0x01, token: 0x0A, options: MapSet.new([])}, + %{name: "BodyTruncated", page: 0x01, token: 0x0B, options: MapSet.new([])}, + %{name: "Business2PhoneNumber", page: 0x01, token: 0x0C, options: MapSet.new([])}, + %{name: "BusinessCity", page: 0x01, token: 0x0D, options: MapSet.new([])}, + %{name: "BusinessCountry", page: 0x01, token: 0x0E, options: MapSet.new([])}, + %{name: "BusinessPostalCode", page: 0x01, token: 0x0F, options: MapSet.new([])}, + %{name: "BusinessState", page: 0x01, token: 0x10, options: MapSet.new([])}, + %{name: "BusinessStreet", page: 0x01, token: 0x11, options: MapSet.new([])}, + %{name: "BusinessFaxNumber", page: 0x01, token: 0x12, options: MapSet.new([])}, + %{name: "BusinessPhoneNumber", page: 0x01, token: 0x13, options: MapSet.new([])}, + %{name: "CarPhoneNumber", page: 0x01, token: 0x14, options: MapSet.new([])}, + %{name: "Categories", page: 0x01, token: 0x15, options: MapSet.new([])}, + %{name: "Category", page: 0x01, token: 0x16, options: MapSet.new([])}, + %{name: "Children", page: 0x01, token: 0x17, options: MapSet.new([])}, + %{name: "Child", page: 0x01, token: 0x18, options: MapSet.new([])}, + %{name: "CompanyName", page: 0x01, token: 0x19, options: MapSet.new([])}, + %{name: "Department", page: 0x01, token: 0x1A, options: MapSet.new([])}, + %{name: "Email1Address", page: 0x01, token: 0x1B, options: MapSet.new([])}, + %{name: "Email2Address", page: 0x01, token: 0x1C, options: MapSet.new([])}, + %{name: "Email3Address", page: 0x01, token: 0x1D, options: MapSet.new([])}, + %{name: "FileAs", page: 0x01, token: 0x1E, options: MapSet.new([])}, + %{name: "FirstName", page: 0x01, token: 0x1F, options: MapSet.new([])}, + %{name: "Home2PhoneNumber", page: 0x01, token: 0x20, options: MapSet.new([])}, + %{name: "HomeCity", page: 0x01, token: 0x21, options: MapSet.new([])}, + %{name: "HomeCountry", page: 0x01, token: 0x22, options: MapSet.new([])}, + %{name: "HomePostalCode", page: 0x01, token: 0x23, options: MapSet.new([])}, + %{name: "HomeState", page: 0x01, token: 0x24, options: MapSet.new([])}, + %{name: "HomeStreet", page: 0x01, token: 0x25, options: MapSet.new([])}, + %{name: "HomeFaxNumber", page: 0x01, token: 0x26, options: MapSet.new([])}, + %{name: "HomePhoneNumber", page: 0x01, token: 0x27, options: MapSet.new([])}, + %{name: "JobTitle", page: 0x01, token: 0x28, options: MapSet.new([])}, + %{name: "LastName", page: 0x01, token: 0x29, options: MapSet.new([])}, + %{name: "MiddleName", page: 0x01, token: 0x2A, options: MapSet.new([])}, + %{name: "MobilePhoneNumber", page: 0x01, token: 0x2B, options: MapSet.new([])}, + %{name: "OfficeLocation", page: 0x01, token: 0x2C, options: MapSet.new([])}, + %{name: "OtherCity", page: 0x01, token: 0x2D, options: MapSet.new([])}, + %{name: "OtherCountry", page: 0x01, token: 0x2E, options: MapSet.new([])}, + %{name: "OtherPostalCode", page: 0x01, token: 0x2F, options: MapSet.new([])}, + %{name: "OtherState", page: 0x01, token: 0x30, options: MapSet.new([])}, + %{name: "OtherStreet", page: 0x01, token: 0x31, options: MapSet.new([])}, + %{name: "PagerNumber", page: 0x01, token: 0x32, options: MapSet.new([])}, + %{name: "RadioPhoneNumber", page: 0x01, token: 0x33, options: MapSet.new([])}, + %{name: "Spouse", page: 0x01, token: 0x34, options: MapSet.new([])}, + %{name: "Suffix", page: 0x01, token: 0x35, options: MapSet.new([])}, + %{name: "Title", page: 0x01, token: 0x36, options: MapSet.new([])}, + %{name: "WebPage", page: 0x01, token: 0x37, options: MapSet.new([])}, + %{name: "YomiCompanyName", page: 0x01, token: 0x38, options: MapSet.new([])}, + %{name: "YomiFirstName", page: 0x01, token: 0x39, options: MapSet.new([])}, + %{name: "YomiLastName", page: 0x01, token: 0x3A, options: MapSet.new([])}, + %{name: "CompressedRTF", page: 0x01, token: 0x3B, options: MapSet.new([])}, + %{name: "Picture", page: 0x01, token: 0x3C, options: MapSet.new([])}, + %{name: "Alias", page: 0x01, token: 0x3D, options: MapSet.new([])}, + %{name: "WeightedRank", page: 0x01, token: 0x3E, options: MapSet.new([])}, + %{name: "Attachment", page: 0x02, token: 0x05, options: MapSet.new([])}, + %{name: "Attachments", page: 0x02, token: 0x06, options: MapSet.new([])}, + %{name: "AttName", page: 0x02, token: 0x07, options: MapSet.new([])}, + %{name: "AttSize", page: 0x02, token: 0x08, options: MapSet.new([])}, + %{name: "AttOId", page: 0x02, token: 0x09, options: MapSet.new([])}, + %{name: "AttMethod", page: 0x02, token: 0x0A, options: MapSet.new([])}, + %{name: "AttRemoved", page: 0x02, token: 0x0B, options: MapSet.new([])}, + %{name: "Body", page: 0x02, token: 0x0C, options: MapSet.new([])}, + %{name: "BodySize", page: 0x02, token: 0x0D, options: MapSet.new([])}, + %{name: "BodyTruncated", page: 0x02, token: 0x0E, options: MapSet.new([])}, + %{name: "DateReceived", page: 0x02, token: 0x0F, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x02, token: 0x10, options: MapSet.new([])}, + %{name: "DisplayTo", page: 0x02, token: 0x11, options: MapSet.new([])}, + %{name: "Importance", page: 0x02, token: 0x12, options: MapSet.new([])}, + %{name: "MessageClass", page: 0x02, token: 0x13, options: MapSet.new([])}, + %{name: "Subject", page: 0x02, token: 0x14, options: MapSet.new([])}, + %{name: "Read", page: 0x02, token: 0x15, options: MapSet.new([])}, + %{name: "To", page: 0x02, token: 0x16, options: MapSet.new([])}, + %{name: "Cc", page: 0x02, token: 0x17, options: MapSet.new([])}, + %{name: "From", page: 0x02, token: 0x18, options: MapSet.new([])}, + %{name: "Reply-To", page: 0x02, token: 0x19, options: MapSet.new([])}, + %{name: "AllDayEvent", page: 0x02, token: 0x1A, options: MapSet.new([])}, + %{name: "Categories", page: 0x02, token: 0x1B, options: MapSet.new([])}, + %{name: "Category", page: 0x02, token: 0x1C, options: MapSet.new([])}, + %{name: "DTStamp", page: 0x02, token: 0x1D, options: MapSet.new([])}, + %{name: "EndTime", page: 0x02, token: 0x1E, options: MapSet.new([])}, + %{name: "InstanceType", page: 0x02, token: 0x1F, options: MapSet.new([])}, + %{name: "BusyStatus", page: 0x02, token: 0x20, options: MapSet.new([])}, + %{name: "Location", page: 0x02, token: 0x21, options: MapSet.new([])}, + %{name: "MeetingRequest", page: 0x02, token: 0x22, options: MapSet.new([])}, + %{name: "Organizer", page: 0x02, token: 0x23, options: MapSet.new([])}, + %{name: "RecurrenceId", page: 0x02, token: 0x24, options: MapSet.new([])}, + %{name: "Reminder", page: 0x02, token: 0x25, options: MapSet.new([])}, + %{name: "ResponseRequested", page: 0x02, token: 0x26, options: MapSet.new([])}, + %{name: "Recurrences", page: 0x02, token: 0x27, options: MapSet.new([])}, + %{name: "Recurrence", page: 0x02, token: 0x28, options: MapSet.new([])}, + %{name: "Recurrence_Type", page: 0x02, token: 0x29, options: MapSet.new([])}, + %{name: "Recurrence_Until", page: 0x02, token: 0x2A, options: MapSet.new([])}, + %{name: "Recurrence_Occurrences", page: 0x02, token: 0x2B, options: MapSet.new([])}, + %{name: "Recurrence_Interval", page: 0x02, token: 0x2C, options: MapSet.new([])}, + %{name: "Recurrence_DayOfWeek", page: 0x02, token: 0x2D, options: MapSet.new([])}, + %{name: "Recurrence_DayOfMonth", page: 0x02, token: 0x2E, options: MapSet.new([])}, + %{name: "Recurrence_WeekOfMonth", page: 0x02, token: 0x2F, options: MapSet.new([])}, + %{name: "Recurrence_MonthOfYear", page: 0x02, token: 0x30, options: MapSet.new([])}, + %{name: "StartTime", page: 0x02, token: 0x31, options: MapSet.new([])}, + %{name: "Sensitivity", page: 0x02, token: 0x32, options: MapSet.new([])}, + %{name: "TimeZone", page: 0x02, token: 0x33, options: MapSet.new([])}, + %{name: "GlobalObjId", page: 0x02, token: 0x34, options: MapSet.new([])}, + %{name: "ThreadTopic", page: 0x02, token: 0x35, options: MapSet.new([])}, + %{name: "MIMEData", page: 0x02, token: 0x36, options: MapSet.new([])}, + %{name: "MIMETruncated", page: 0x02, token: 0x37, options: MapSet.new([])}, + %{name: "MIMESize", page: 0x02, token: 0x38, options: MapSet.new([])}, + %{name: "InternetCPID", page: 0x02, token: 0x39, options: MapSet.new([])}, + %{name: "Flag", page: 0x02, token: 0x3A, options: MapSet.new([])}, + %{name: "FlagStatus", page: 0x02, token: 0x3B, options: MapSet.new([])}, + %{name: "ContentClass", page: 0x02, token: 0x3C, options: MapSet.new([])}, + %{name: "FlagType", page: 0x02, token: 0x3D, options: MapSet.new([])}, + %{name: "CompleteTime", page: 0x02, token: 0x3E, options: MapSet.new([])}, + %{name: "DisallowNewTimeProposal", page: 0x02, token: 0x3F, options: MapSet.new([])}, + %{name: "Notify", page: 0x03, token: 0x05, options: MapSet.new([])}, + %{name: "Notification", page: 0x03, token: 0x06, options: MapSet.new([])}, + %{name: "Version", page: 0x03, token: 0x07, options: MapSet.new([])}, + %{name: "LifeTime", page: 0x03, token: 0x08, options: MapSet.new([])}, + %{name: "DeviceInfo", page: 0x03, token: 0x09, options: MapSet.new([])}, + %{name: "Enable", page: 0x03, token: 0x0A, options: MapSet.new([])}, + %{name: "Folder", page: 0x03, token: 0x0B, options: MapSet.new([])}, + %{name: "ServerId", page: 0x03, token: 0x0C, options: MapSet.new([])}, + %{name: "DeviceAddress", page: 0x03, token: 0x0D, options: MapSet.new([])}, + %{name: "ValidCarrierProfiles", page: 0x03, token: 0x0E, options: MapSet.new([])}, + %{name: "CarrierProfile", page: 0x03, token: 0x0F, options: MapSet.new([])}, + %{name: "Status", page: 0x03, token: 0x10, options: MapSet.new([])}, + %{name: "Responses", page: 0x03, token: 0x11, options: MapSet.new([])}, + %{name: "Devices", page: 0x03, token: 0x12, options: MapSet.new([])}, + %{name: "Device", page: 0x03, token: 0x13, options: MapSet.new([])}, + %{name: "Id", page: 0x03, token: 0x14, options: MapSet.new([])}, + %{name: "Expiry", page: 0x03, token: 0x15, options: MapSet.new([])}, + %{name: "NotifyGUID", page: 0x03, token: 0x16, options: MapSet.new([])}, + %{name: "DeviceFriendlyName", page: 0x03, token: 0x17, options: MapSet.new([])}, + %{name: "TimeZone", page: 0x04, token: 0x05, options: MapSet.new([])}, + %{name: "AllDayEvent", page: 0x04, token: 0x06, options: MapSet.new([])}, + %{name: "Attendees", page: 0x04, token: 0x07, options: MapSet.new([])}, + %{name: "Attendee", page: 0x04, token: 0x08, options: MapSet.new([])}, + %{name: "Attendee_Email", page: 0x04, token: 0x09, options: MapSet.new([])}, + %{name: "Attendee_Name", page: 0x04, token: 0x0A, options: MapSet.new([])}, + %{name: "Body", page: 0x04, token: 0x0B, options: MapSet.new([])}, + %{name: "BodyTruncated", page: 0x04, token: 0x0C, options: MapSet.new([])}, + %{name: "BusyStatus", page: 0x04, token: 0x0D, options: MapSet.new([])}, + %{name: "Categories", page: 0x04, token: 0x0E, options: MapSet.new([])}, + %{name: "Category", page: 0x04, token: 0x0F, options: MapSet.new([])}, + %{name: "Compressed_RTF", page: 0x04, token: 0x10, options: MapSet.new([])}, + %{name: "DTStamp", page: 0x04, token: 0x11, options: MapSet.new([])}, + %{name: "EndTime", page: 0x04, token: 0x12, options: MapSet.new([])}, + %{name: "Exception", page: 0x04, token: 0x13, options: MapSet.new([])}, + %{name: "Exceptions", page: 0x04, token: 0x14, options: MapSet.new([])}, + %{name: "Exception_Deleted", page: 0x04, token: 0x15, options: MapSet.new([])}, + %{name: "Exception_StartTime", page: 0x04, token: 0x16, options: MapSet.new([])}, + %{name: "Location", page: 0x04, token: 0x17, options: MapSet.new([])}, + %{name: "MeetingStatus", page: 0x04, token: 0x18, options: MapSet.new([])}, + %{name: "Organizer_Email", page: 0x04, token: 0x19, options: MapSet.new([])}, + %{name: "Organizer_Name", page: 0x04, token: 0x1A, options: MapSet.new([])}, + %{name: "Recurrence", page: 0x04, token: 0x1B, options: MapSet.new([])}, + %{name: "Recurrence_Type", page: 0x04, token: 0x1C, options: MapSet.new([])}, + %{name: "Recurrence_Until", page: 0x04, token: 0x1D, options: MapSet.new([])}, + %{name: "Recurrence_Occurrences", page: 0x04, token: 0x1E, options: MapSet.new([])}, + %{name: "Recurrence_Interval", page: 0x04, token: 0x1F, options: MapSet.new([])}, + %{name: "Recurrence_DayOfWeek", page: 0x04, token: 0x20, options: MapSet.new([])}, + %{name: "Recurrence_DayOfMonth", page: 0x04, token: 0x21, options: MapSet.new([])}, + %{name: "Recurrence_WeekOfMonth", page: 0x04, token: 0x22, options: MapSet.new([])}, + %{name: "Recurrence_MonthOfYear", page: 0x04, token: 0x23, options: MapSet.new([])}, + %{name: "Reminder", page: 0x04, token: 0x24, options: MapSet.new([])}, + %{name: "Sensitivity", page: 0x04, token: 0x25, options: MapSet.new([])}, + %{name: "Subject", page: 0x04, token: 0x26, options: MapSet.new([])}, + %{name: "StartTime", page: 0x04, token: 0x27, options: MapSet.new([])}, + %{name: "UID", page: 0x04, token: 0x28, options: MapSet.new([])}, + %{name: "Attendee_Status", page: 0x04, token: 0x29, options: MapSet.new([])}, + %{name: "Attendee_Type", page: 0x04, token: 0x2A, options: MapSet.new([])}, + %{name: "DisallowNewTimeProposal", page: 0x04, token: 0x33, options: MapSet.new([])}, + %{name: "ResponseRequested", page: 0x04, token: 0x34, options: MapSet.new([])}, + %{name: "AppointmentReplyTime", page: 0x04, token: 0x35, options: MapSet.new([])}, + %{name: "ResponseType", page: 0x04, token: 0x36, options: MapSet.new([])}, + %{name: "CalendarType", page: 0x04, token: 0x37, options: MapSet.new([])}, + %{name: "IsLeapMonth", page: 0x04, token: 0x38, options: MapSet.new([])}, + %{name: "FirstDayOfWeek", page: 0x04, token: 0x39, options: MapSet.new([])}, + %{name: "OnlineMeetingConfLink", page: 0x04, token: 0x3A, options: MapSet.new([])}, + %{name: "OnlineMeetingExternalLink", page: 0x04, token: 0x3B, options: MapSet.new([])}, + %{name: "ClientUid", page: 0x04, token: 0x3C, options: MapSet.new([])}, + %{name: "MoveItems", page: 0x05, token: 0x05, options: MapSet.new([])}, + %{name: "Move", page: 0x05, token: 0x06, options: MapSet.new([])}, + %{name: "SrcMsgId", page: 0x05, token: 0x07, options: MapSet.new([])}, + %{name: "SrcFldId", page: 0x05, token: 0x08, options: MapSet.new([])}, + %{name: "DstFldId", page: 0x05, token: 0x09, options: MapSet.new([])}, + %{name: "Response", page: 0x05, token: 0x0A, options: MapSet.new([])}, + %{name: "Status", page: 0x05, token: 0x0B, options: MapSet.new([])}, + %{name: "DstMsgId", page: 0x05, token: 0x0C, options: MapSet.new([])}, + %{name: "GetItemEstimate", page: 0x06, token: 0x05, options: MapSet.new([])}, + %{name: "Version", page: 0x06, token: 0x06, options: MapSet.new([])}, + %{name: "Collections", page: 0x06, token: 0x07, options: MapSet.new([])}, + %{name: "Collection", page: 0x06, token: 0x08, options: MapSet.new([])}, + %{name: "Class", page: 0x06, token: 0x09, options: MapSet.new([])}, + %{name: "CollectionId", page: 0x06, token: 0x0A, options: MapSet.new([])}, + %{name: "DateTime", page: 0x06, token: 0x0B, options: MapSet.new([])}, + %{name: "Estimate", page: 0x06, token: 0x0C, options: MapSet.new([])}, + %{name: "Response", page: 0x06, token: 0x0D, options: MapSet.new([])}, + %{name: "Status", page: 0x06, token: 0x0E, options: MapSet.new([])}, + %{name: "Folders", page: 0x07, token: 0x05, options: MapSet.new([])}, + %{name: "Folder", page: 0x07, token: 0x06, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x07, token: 0x07, options: MapSet.new([])}, + %{name: "ServerId", page: 0x07, token: 0x08, options: MapSet.new([])}, + %{name: "ParentId", page: 0x07, token: 0x09, options: MapSet.new([])}, + %{name: "Type", page: 0x07, token: 0x0A, options: MapSet.new([])}, + %{name: "Response", page: 0x07, token: 0x0B, options: MapSet.new([])}, + %{name: "Status", page: 0x07, token: 0x0C, options: MapSet.new([])}, + %{name: "ContentClass", page: 0x07, token: 0x0D, options: MapSet.new([])}, + %{name: "Changes", page: 0x07, token: 0x0E, options: MapSet.new([])}, + %{name: "Add", page: 0x07, token: 0x0F, options: MapSet.new([])}, + %{name: "Delete", page: 0x07, token: 0x10, options: MapSet.new([])}, + %{name: "Update", page: 0x07, token: 0x11, options: MapSet.new([])}, + %{name: "SyncKey", page: 0x07, token: 0x12, options: MapSet.new([])}, + %{name: "FolderCreate", page: 0x07, token: 0x13, options: MapSet.new([])}, + %{name: "FolderDelete", page: 0x07, token: 0x14, options: MapSet.new([])}, + %{name: "FolderUpdate", page: 0x07, token: 0x15, options: MapSet.new([])}, + %{name: "FolderSync", page: 0x07, token: 0x16, options: MapSet.new([])}, + %{name: "Count", page: 0x07, token: 0x17, options: MapSet.new([])}, + %{name: "Version", page: 0x07, token: 0x18, options: MapSet.new([])}, + %{name: "CalendarId", page: 0x08, token: 0x05, options: MapSet.new([])}, + %{name: "CollectionId", page: 0x08, token: 0x06, options: MapSet.new([])}, + %{name: "MeetingResponse", page: 0x08, token: 0x07, options: MapSet.new([])}, + %{name: "RequestId", page: 0x08, token: 0x08, options: MapSet.new([])}, + %{name: "Request", page: 0x08, token: 0x09, options: MapSet.new([])}, + %{name: "Result", page: 0x08, token: 0x0A, options: MapSet.new([])}, + %{name: "Status", page: 0x08, token: 0x0B, options: MapSet.new([])}, + %{name: "UserResponse", page: 0x08, token: 0x0C, options: MapSet.new([])}, + %{name: "Version", page: 0x08, token: 0x0D, options: MapSet.new([])}, + %{name: "InstanceId", page: 0x08, token: 0x0E, options: MapSet.new([])}, + %{name: "ProposedStartTime", page: 0x08, token: 0x10, options: MapSet.new([])}, + %{name: "ProposedEndTime", page: 0x08, token: 0x11, options: MapSet.new([])}, + %{name: "SendResponse", page: 0x08, token: 0x12, options: MapSet.new([])}, + %{name: "Body", page: 0x09, token: 0x05, options: MapSet.new([])}, + %{name: "BodySize", page: 0x09, token: 0x06, options: MapSet.new([])}, + %{name: "BodyTruncated", page: 0x09, token: 0x07, options: MapSet.new([])}, + %{name: "Categories", page: 0x09, token: 0x08, options: MapSet.new([])}, + %{name: "Category", page: 0x09, token: 0x09, options: MapSet.new([])}, + %{name: "Complete", page: 0x09, token: 0x0A, options: MapSet.new([])}, + %{name: "DateCompleted", page: 0x09, token: 0x0B, options: MapSet.new([])}, + %{name: "DueDate", page: 0x09, token: 0x0C, options: MapSet.new([])}, + %{name: "UTCDueDate", page: 0x09, token: 0x0D, options: MapSet.new([])}, + %{name: "Importance", page: 0x09, token: 0x0E, options: MapSet.new([])}, + %{name: "Recurrence", page: 0x09, token: 0x0F, options: MapSet.new([])}, + %{name: "Recurrence_Type", page: 0x09, token: 0x10, options: MapSet.new([])}, + %{name: "Recurrence_Start", page: 0x09, token: 0x11, options: MapSet.new([])}, + %{name: "Recurrence_Until", page: 0x09, token: 0x12, options: MapSet.new([])}, + %{name: "Recurrence_Occurrences", page: 0x09, token: 0x13, options: MapSet.new([])}, + %{name: "Recurrence_Interval", page: 0x09, token: 0x14, options: MapSet.new([])}, + %{name: "Recurrence_DayOfMonth", page: 0x09, token: 0x15, options: MapSet.new([])}, + %{name: "Recurrence_DayOfWeek", page: 0x09, token: 0x16, options: MapSet.new([])}, + %{name: "Recurrence_WeekOfMonth", page: 0x09, token: 0x17, options: MapSet.new([])}, + %{name: "Recurrence_MonthOfYear", page: 0x09, token: 0x18, options: MapSet.new([])}, + %{name: "Recurrence_Regenerate", page: 0x09, token: 0x19, options: MapSet.new([])}, + %{name: "Recurrence_DeadOccur", page: 0x09, token: 0x1A, options: MapSet.new([])}, + %{name: "ReminderSet", page: 0x09, token: 0x1B, options: MapSet.new([])}, + %{name: "ReminderTime", page: 0x09, token: 0x1C, options: MapSet.new([])}, + %{name: "Sensitivity", page: 0x09, token: 0x1D, options: MapSet.new([])}, + %{name: "StartDate", page: 0x09, token: 0x1E, options: MapSet.new([])}, + %{name: "UTCStartDate", page: 0x09, token: 0x1F, options: MapSet.new([])}, + %{name: "Subject", page: 0x09, token: 0x20, options: MapSet.new([])}, + %{name: "CompressedRTF", page: 0x09, token: 0x21, options: MapSet.new([])}, + %{name: "OrdinalDate", page: 0x09, token: 0x22, options: MapSet.new([])}, + %{name: "SubOrdinalDate", page: 0x09, token: 0x23, options: MapSet.new([])}, + %{name: "CalendarType", page: 0x09, token: 0x24, options: MapSet.new([])}, + %{name: "IsLeapMonth", page: 0x09, token: 0x25, options: MapSet.new([])}, + %{name: "FirstDayOfWeek", page: 0x09, token: 0x26, options: MapSet.new([])}, + %{name: "ResolveRecipients", page: 0x0A, token: 0x05, options: MapSet.new([])}, + %{name: "Response", page: 0x0A, token: 0x06, options: MapSet.new([])}, + %{name: "Status", page: 0x0A, token: 0x07, options: MapSet.new([])}, + %{name: "Type", page: 0x0A, token: 0x08, options: MapSet.new([])}, + %{name: "Recipient", page: 0x0A, token: 0x09, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x0A, token: 0x0A, options: MapSet.new([])}, + %{name: "EmailAddress", page: 0x0A, token: 0x0B, options: MapSet.new([])}, + %{name: "Certificates", page: 0x0A, token: 0x0C, options: MapSet.new([])}, + %{name: "Certificate", page: 0x0A, token: 0x0D, options: MapSet.new([])}, + %{name: "MiniCertificate", page: 0x0A, token: 0x0E, options: MapSet.new([])}, + %{name: "Options", page: 0x0A, token: 0x0F, options: MapSet.new([])}, + %{name: "To", page: 0x0A, token: 0x10, options: MapSet.new([])}, + %{name: "CertificateRetrieval", page: 0x0A, token: 0x11, options: MapSet.new([])}, + %{name: "RecipientCount", page: 0x0A, token: 0x12, options: MapSet.new([])}, + %{name: "MaxCertificates", page: 0x0A, token: 0x13, options: MapSet.new([])}, + %{name: "MaxAmbiguousRecipients", page: 0x0A, token: 0x14, options: MapSet.new([])}, + %{name: "CertificateCount", page: 0x0A, token: 0x15, options: MapSet.new([])}, + %{name: "Availability", page: 0x0A, token: 0x16, options: MapSet.new([])}, + %{name: "StartTime", page: 0x0A, token: 0x17, options: MapSet.new([])}, + %{name: "EndTime", page: 0x0A, token: 0x18, options: MapSet.new([])}, + %{name: "MergedFreeBusy", page: 0x0A, token: 0x19, options: MapSet.new([])}, + %{name: "Picture", page: 0x0A, token: 0x1A, options: MapSet.new([])}, + %{name: "MaxSize", page: 0x0A, token: 0x1B, options: MapSet.new([])}, + %{name: "Data", page: 0x0A, token: 0x1C, options: MapSet.new([:binary])}, + %{name: "MaxPictures", page: 0x0A, token: 0x1D, options: MapSet.new([])}, + %{name: "ValidateCert", page: 0x0B, token: 0x05, options: MapSet.new([])}, + %{name: "Certificates", page: 0x0B, token: 0x06, options: MapSet.new([])}, + %{name: "Certificate", page: 0x0B, token: 0x07, options: MapSet.new([])}, + %{name: "CertificateChain", page: 0x0B, token: 0x08, options: MapSet.new([])}, + %{name: "CheckCRL", page: 0x0B, token: 0x09, options: MapSet.new([])}, + %{name: "Status", page: 0x0B, token: 0x0A, options: MapSet.new([])}, + %{name: "CustomerId", page: 0x0C, token: 0x05, options: MapSet.new([])}, + %{name: "GovernmentId", page: 0x0C, token: 0x06, options: MapSet.new([])}, + %{name: "IMAddress", page: 0x0C, token: 0x07, options: MapSet.new([])}, + %{name: "IMAddress2", page: 0x0C, token: 0x08, options: MapSet.new([])}, + %{name: "IMAddress3", page: 0x0C, token: 0x09, options: MapSet.new([])}, + %{name: "ManagerName", page: 0x0C, token: 0x0A, options: MapSet.new([])}, + %{name: "CompanyMainPhone", page: 0x0C, token: 0x0B, options: MapSet.new([])}, + %{name: "AccountName", page: 0x0C, token: 0x0C, options: MapSet.new([])}, + %{name: "NickName", page: 0x0C, token: 0x0D, options: MapSet.new([])}, + %{name: "MMS", page: 0x0C, token: 0x0E, options: MapSet.new([])}, + %{name: "Ping", page: 0x0D, token: 0x05, options: MapSet.new([])}, + %{name: "AutdState", page: 0x0D, token: 0x06, options: MapSet.new([])}, + %{name: "Status", page: 0x0D, token: 0x07, options: MapSet.new([])}, + %{name: "HeartbeatInterval", page: 0x0D, token: 0x08, options: MapSet.new([])}, + %{name: "Folders", page: 0x0D, token: 0x09, options: MapSet.new([])}, + %{name: "Folder", page: 0x0D, token: 0x0A, options: MapSet.new([])}, + %{name: "Id", page: 0x0D, token: 0x0B, options: MapSet.new([])}, + %{name: "Class", page: 0x0D, token: 0x0C, options: MapSet.new([])}, + %{name: "MaxFolders", page: 0x0D, token: 0x0D, options: MapSet.new([])}, + %{name: "Provision", page: 0x0E, token: 0x05, options: MapSet.new([])}, + %{name: "Policies", page: 0x0E, token: 0x06, options: MapSet.new([])}, + %{name: "Policy", page: 0x0E, token: 0x07, options: MapSet.new([])}, + %{name: "PolicyType", page: 0x0E, token: 0x08, options: MapSet.new([])}, + %{name: "PolicyKey", page: 0x0E, token: 0x09, options: MapSet.new([])}, + %{name: "Data", page: 0x0E, token: 0x0A, options: MapSet.new([])}, + %{name: "Status", page: 0x0E, token: 0x0B, options: MapSet.new([])}, + %{name: "RemoteWipe", page: 0x0E, token: 0x0C, options: MapSet.new([])}, + %{name: "EASProvisionDoc", page: 0x0E, token: 0x0D, options: MapSet.new([])}, + %{name: "DevicePasswordEnabled", page: 0x0E, token: 0x0E, options: MapSet.new([])}, + %{ + name: "AlphanumericDevicePasswordRequired", + page: 0x0E, + token: 0x0F, + options: MapSet.new([]) + }, + %{name: "DeviceEncryptionEnabled", page: 0x0E, token: 0x10, options: MapSet.new([])}, + %{name: "RequireStorageCardEncryption", page: 0x0E, token: 0x10, options: MapSet.new([])}, + %{name: "PasswordRecoveryEnabled", page: 0x0E, token: 0x11, options: MapSet.new([])}, + %{name: "DocumentBrowseEnabled", page: 0x0E, token: 0x12, options: MapSet.new([])}, + %{name: "AttachmentsEnabled", page: 0x0E, token: 0x13, options: MapSet.new([])}, + %{name: "MinDevicePasswordLength", page: 0x0E, token: 0x14, options: MapSet.new([])}, + %{name: "MaxInactivityTimeDeviceLock", page: 0x0E, token: 0x15, options: MapSet.new([])}, + %{name: "MaxDevicePasswordFailedAttempts", page: 0x0E, token: 0x16, options: MapSet.new([])}, + %{name: "MaxAttachmentSize", page: 0x0E, token: 0x17, options: MapSet.new([])}, + %{name: "AllowSimpleDevicePassword", page: 0x0E, token: 0x18, options: MapSet.new([])}, + %{name: "DevicePasswordExpiration", page: 0x0E, token: 0x19, options: MapSet.new([])}, + %{name: "DevicePasswordHistory", page: 0x0E, token: 0x1A, options: MapSet.new([])}, + %{name: "AllowStorageCard", page: 0x0E, token: 0x1B, options: MapSet.new([])}, + %{name: "AllowCamera", page: 0x0E, token: 0x1C, options: MapSet.new([])}, + %{name: "RequireDeviceEncryption", page: 0x0E, token: 0x1D, options: MapSet.new([])}, + %{name: "AllowUnsignedApplications", page: 0x0E, token: 0x1E, options: MapSet.new([])}, + %{ + name: "AllowUnsignedInstallationPackages", + page: 0x0E, + token: 0x1F, + options: MapSet.new([]) + }, + %{ + name: "MinDevicePasswordComplexCharacters", + page: 0x0E, + token: 0x20, + options: MapSet.new([]) + }, + %{name: "AllowWiFi", page: 0x0E, token: 0x21, options: MapSet.new([])}, + %{name: "AllowTextMessaging", page: 0x0E, token: 0x22, options: MapSet.new([])}, + %{name: "AllowPOPIMAPEmail", page: 0x0E, token: 0x23, options: MapSet.new([])}, + %{name: "AllowBluetooth", page: 0x0E, token: 0x24, options: MapSet.new([])}, + %{name: "AllowIrDA", page: 0x0E, token: 0x25, options: MapSet.new([])}, + %{name: "RequireManualSyncWhenRoaming", page: 0x0E, token: 0x26, options: MapSet.new([])}, + %{name: "AllowDesktopSync", page: 0x0E, token: 0x27, options: MapSet.new([])}, + %{name: "MaxCalendarAgeFilter", page: 0x0E, token: 0x28, options: MapSet.new([])}, + %{name: "AllowHTMLEmail", page: 0x0E, token: 0x29, options: MapSet.new([])}, + %{name: "MaxEmailAgeFilter", page: 0x0E, token: 0x2A, options: MapSet.new([])}, + %{name: "MaxEmailBodyTruncationSize", page: 0x0E, token: 0x2B, options: MapSet.new([])}, + %{name: "MaxEmailHTMLBodyTruncationSize", page: 0x0E, token: 0x2C, options: MapSet.new([])}, + %{name: "RequireSignedSMIMEMessages", page: 0x0E, token: 0x2D, options: MapSet.new([])}, + %{name: "RequireEncryptedSMIMEMessages", page: 0x0E, token: 0x2E, options: MapSet.new([])}, + %{name: "RequireSignedSMIMEAlgorithm", page: 0x0E, token: 0x2F, options: MapSet.new([])}, + %{name: "RequireEncryptionSMIMEAlgorithm", page: 0x0E, token: 0x30, options: MapSet.new([])}, + %{ + name: "AllowSMIMEEncryptionAlgorithmNegotiation", + page: 0x0E, + token: 0x31, + options: MapSet.new([]) + }, + %{name: "AllowSMIMESoftCerts", page: 0x0E, token: 0x32, options: MapSet.new([])}, + %{name: "AllowBrowser", page: 0x0E, token: 0x33, options: MapSet.new([])}, + %{name: "AllowConsumerEmail", page: 0x0E, token: 0x34, options: MapSet.new([])}, + %{name: "AllowRemoteDesktop", page: 0x0E, token: 0x35, options: MapSet.new([])}, + %{name: "AllowInternetSharing", page: 0x0E, token: 0x36, options: MapSet.new([])}, + %{name: "UnapprovedInROMApplicationList", page: 0x0E, token: 0x37, options: MapSet.new([])}, + %{name: "ApplicationName", page: 0x0E, token: 0x38, options: MapSet.new([])}, + %{name: "ApprovedApplicationList", page: 0x0E, token: 0x39, options: MapSet.new([])}, + %{name: "Hash", page: 0x0E, token: 0x3A, options: MapSet.new([])}, + %{name: "AccountOnlyRemoteWipe", page: 0x0E, token: 0x3B, options: MapSet.new([])}, + %{name: "Search", page: 0x0F, token: 0x05, options: MapSet.new([])}, + %{name: "Store", page: 0x0F, token: 0x07, options: MapSet.new([])}, + %{name: "Name", page: 0x0F, token: 0x08, options: MapSet.new([])}, + %{name: "Query", page: 0x0F, token: 0x09, options: MapSet.new([])}, + %{name: "Options", page: 0x0F, token: 0x0A, options: MapSet.new([])}, + %{name: "Range", page: 0x0F, token: 0x0B, options: MapSet.new([])}, + %{name: "Status", page: 0x0F, token: 0x0C, options: MapSet.new([])}, + %{name: "Response", page: 0x0F, token: 0x0D, options: MapSet.new([])}, + %{name: "Result", page: 0x0F, token: 0x0E, options: MapSet.new([])}, + %{name: "Properties", page: 0x0F, token: 0x0F, options: MapSet.new([])}, + %{name: "Total", page: 0x0F, token: 0x10, options: MapSet.new([])}, + %{name: "EqualTo", page: 0x0F, token: 0x11, options: MapSet.new([])}, + %{name: "Value", page: 0x0F, token: 0x12, options: MapSet.new([])}, + %{name: "And", page: 0x0F, token: 0x13, options: MapSet.new([])}, + %{name: "Or", page: 0x0F, token: 0x14, options: MapSet.new([])}, + %{name: "FreeText", page: 0x0F, token: 0x15, options: MapSet.new([])}, + %{name: "DeepTraversal", page: 0x0F, token: 0x17, options: MapSet.new([])}, + %{name: "LongId", page: 0x0F, token: 0x18, options: MapSet.new([])}, + %{name: "RebuildResults", page: 0x0F, token: 0x19, options: MapSet.new([])}, + %{name: "LessThan", page: 0x0F, token: 0x1A, options: MapSet.new([])}, + %{name: "GreaterThan", page: 0x0F, token: 0x1B, options: MapSet.new([])}, + %{name: "Schema", page: 0x0F, token: 0x1C, options: MapSet.new([])}, + %{name: "Supported", page: 0x0F, token: 0x1D, options: MapSet.new([])}, + %{name: "UserName", page: 0x0F, token: 0x1E, options: MapSet.new([])}, + %{name: "Password", page: 0x0F, token: 0x1F, options: MapSet.new([])}, + %{name: "ConversationId", page: 0x0F, token: 0x20, options: MapSet.new([:binary])}, + %{name: "Picture", page: 0x0F, token: 0x21, options: MapSet.new([])}, + %{name: "MaxSize", page: 0x0F, token: 0x22, options: MapSet.new([])}, + %{name: "MaxPictures", page: 0x0F, token: 0x23, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x10, token: 0x05, options: MapSet.new([])}, + %{name: "Phone", page: 0x10, token: 0x06, options: MapSet.new([])}, + %{name: "Office", page: 0x10, token: 0x07, options: MapSet.new([])}, + %{name: "Title", page: 0x10, token: 0x08, options: MapSet.new([])}, + %{name: "Company", page: 0x10, token: 0x09, options: MapSet.new([])}, + %{name: "Alias", page: 0x10, token: 0x0A, options: MapSet.new([])}, + %{name: "FirstName", page: 0x10, token: 0x0B, options: MapSet.new([])}, + %{name: "LastName", page: 0x10, token: 0x0C, options: MapSet.new([])}, + %{name: "HomePhone", page: 0x10, token: 0x0D, options: MapSet.new([])}, + %{name: "MobilePhone", page: 0x10, token: 0x0E, options: MapSet.new([])}, + %{name: "EmailAddress", page: 0x10, token: 0x0F, options: MapSet.new([])}, + %{name: "Picture", page: 0x10, token: 0x10, options: MapSet.new([])}, + %{name: "Status", page: 0x10, token: 0x11, options: MapSet.new([])}, + %{name: "Data", page: 0x10, token: 0x12, options: MapSet.new([:binary])}, + %{name: "BodyPreference", page: 0x11, token: 0x05, options: MapSet.new([])}, + %{name: "Type", page: 0x11, token: 0x06, options: MapSet.new([])}, + %{name: "TruncationSize", page: 0x11, token: 0x07, options: MapSet.new([])}, + %{name: "AllOrNone", page: 0x11, token: 0x08, options: MapSet.new([])}, + %{name: "Body", page: 0x11, token: 0x0A, options: MapSet.new([])}, + %{name: "Data", page: 0x11, token: 0x0B, options: MapSet.new([])}, + %{name: "EstimatedDataSize", page: 0x11, token: 0x0C, options: MapSet.new([])}, + %{name: "Truncated", page: 0x11, token: 0x0D, options: MapSet.new([])}, + %{name: "Attachments", page: 0x11, token: 0x0E, options: MapSet.new([])}, + %{name: "Attachment", page: 0x11, token: 0x0F, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x11, token: 0x10, options: MapSet.new([])}, + %{name: "FileReference", page: 0x11, token: 0x11, options: MapSet.new([])}, + %{name: "Method", page: 0x11, token: 0x12, options: MapSet.new([])}, + %{name: "ContentId", page: 0x11, token: 0x13, options: MapSet.new([])}, + %{name: "ContentLocation", page: 0x11, token: 0x14, options: MapSet.new([])}, + %{name: "IsInline", page: 0x11, token: 0x15, options: MapSet.new([])}, + %{name: "NativeBodyType", page: 0x11, token: 0x16, options: MapSet.new([])}, + %{name: "ContentType", page: 0x11, token: 0x17, options: MapSet.new([])}, + %{name: "Preview", page: 0x11, token: 0x18, options: MapSet.new([])}, + %{name: "BodyPartPreference", page: 0x11, token: 0x19, options: MapSet.new([])}, + %{name: "BodyPart", page: 0x11, token: 0x1A, options: MapSet.new([])}, + %{name: "Status", page: 0x11, token: 0x1B, options: MapSet.new([])}, + %{name: "Add", page: 0x11, token: 0x1C, options: MapSet.new([])}, + %{name: "Delete", page: 0x11, token: 0x1D, options: MapSet.new([])}, + %{name: "ClientId", page: 0x11, token: 0x1E, options: MapSet.new([])}, + %{name: "Content", page: 0x11, token: 0x1F, options: MapSet.new([:binary])}, + %{name: "Location", page: 0x11, token: 0x20, options: MapSet.new([])}, + %{name: "Annotation", page: 0x11, token: 0x21, options: MapSet.new([])}, + %{name: "Street", page: 0x11, token: 0x22, options: MapSet.new([])}, + %{name: "City", page: 0x11, token: 0x23, options: MapSet.new([])}, + %{name: "State", page: 0x11, token: 0x24, options: MapSet.new([])}, + %{name: "Country", page: 0x11, token: 0x25, options: MapSet.new([])}, + %{name: "PostalCode", page: 0x11, token: 0x26, options: MapSet.new([])}, + %{name: "Latitude", page: 0x11, token: 0x27, options: MapSet.new([])}, + %{name: "Longitude", page: 0x11, token: 0x28, options: MapSet.new([])}, + %{name: "Accuracy", page: 0x11, token: 0x29, options: MapSet.new([])}, + %{name: "Altitude", page: 0x11, token: 0x2A, options: MapSet.new([])}, + %{name: "AltitudeAccuracy", page: 0x11, token: 0x2B, options: MapSet.new([])}, + %{name: "LocationUri", page: 0x11, token: 0x2C, options: MapSet.new([])}, + %{name: "InstanceId", page: 0x11, token: 0x2D, options: MapSet.new([])}, + %{name: "Settings", page: 0x12, token: 0x05, options: MapSet.new([])}, + %{name: "Status", page: 0x12, token: 0x06, options: MapSet.new([])}, + %{name: "Get", page: 0x12, token: 0x07, options: MapSet.new([])}, + %{name: "Set", page: 0x12, token: 0x08, options: MapSet.new([])}, + %{name: "Oof", page: 0x12, token: 0x09, options: MapSet.new([])}, + %{name: "OofState", page: 0x12, token: 0x0A, options: MapSet.new([])}, + %{name: "StartTime", page: 0x12, token: 0x0B, options: MapSet.new([])}, + %{name: "EndTime", page: 0x12, token: 0x0C, options: MapSet.new([])}, + %{name: "OofMessage", page: 0x12, token: 0x0D, options: MapSet.new([])}, + %{name: "AppliesToInternal", page: 0x12, token: 0x0E, options: MapSet.new([])}, + %{name: "AppliesToExternalKnown", page: 0x12, token: 0x0F, options: MapSet.new([])}, + %{name: "AppliesToExternalUnknown", page: 0x12, token: 0x10, options: MapSet.new([])}, + %{name: "Enabled", page: 0x12, token: 0x11, options: MapSet.new([])}, + %{name: "ReplyMessage", page: 0x12, token: 0x12, options: MapSet.new([])}, + %{name: "BodyType", page: 0x12, token: 0x13, options: MapSet.new([])}, + %{name: "DevicePassword", page: 0x12, token: 0x14, options: MapSet.new([])}, + %{name: "Password", page: 0x12, token: 0x15, options: MapSet.new([])}, + %{name: "DeviceInformation", page: 0x12, token: 0x16, options: MapSet.new([])}, + %{name: "Model", page: 0x12, token: 0x17, options: MapSet.new([])}, + %{name: "IMEI", page: 0x12, token: 0x18, options: MapSet.new([])}, + %{name: "FriendlyName", page: 0x12, token: 0x19, options: MapSet.new([])}, + %{name: "OS", page: 0x12, token: 0x1A, options: MapSet.new([])}, + %{name: "OSLanguage", page: 0x12, token: 0x1B, options: MapSet.new([])}, + %{name: "PhoneNumber", page: 0x12, token: 0x1C, options: MapSet.new([])}, + %{name: "UserInformation", page: 0x12, token: 0x1D, options: MapSet.new([])}, + %{name: "EmailAddresses", page: 0x12, token: 0x1E, options: MapSet.new([])}, + %{name: "SmtpAddress", page: 0x12, token: 0x1F, options: MapSet.new([])}, + %{name: "UserAgent", page: 0x12, token: 0x20, options: MapSet.new([])}, + %{name: "EnableOutboundSMS", page: 0x12, token: 0x21, options: MapSet.new([])}, + %{name: "MobileOperator", page: 0x12, token: 0x22, options: MapSet.new([])}, + %{name: "PrimarySmtpAddress", page: 0x12, token: 0x23, options: MapSet.new([])}, + %{name: "Accounts", page: 0x12, token: 0x24, options: MapSet.new([])}, + %{name: "Account", page: 0x12, token: 0x25, options: MapSet.new([])}, + %{name: "AccountId", page: 0x12, token: 0x26, options: MapSet.new([])}, + %{name: "AccountName", page: 0x12, token: 0x27, options: MapSet.new([])}, + %{name: "UserDisplayName", page: 0x12, token: 0x28, options: MapSet.new([])}, + %{name: "SendDisabled", page: 0x12, token: 0x29, options: MapSet.new([])}, + %{name: "ihsManagementInformation", page: 0x12, token: 0x2B, options: MapSet.new([])}, + %{name: "LinkId", page: 0x13, token: 0x05, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x13, token: 0x06, options: MapSet.new([])}, + %{name: "IsFolder", page: 0x13, token: 0x07, options: MapSet.new([])}, + %{name: "CreationDate", page: 0x13, token: 0x08, options: MapSet.new([])}, + %{name: "LastModifiedDate", page: 0x13, token: 0x09, options: MapSet.new([])}, + %{name: "IsHidden", page: 0x13, token: 0x0A, options: MapSet.new([])}, + %{name: "ContentLength", page: 0x13, token: 0x0B, options: MapSet.new([])}, + %{name: "ContentType", page: 0x13, token: 0x0C, options: MapSet.new([])}, + %{name: "ItemOperations", page: 0x14, token: 0x05, options: MapSet.new([])}, + %{name: "Fetch", page: 0x14, token: 0x06, options: MapSet.new([])}, + %{name: "Store", page: 0x14, token: 0x07, options: MapSet.new([])}, + %{name: "Options", page: 0x14, token: 0x08, options: MapSet.new([])}, + %{name: "Range", page: 0x14, token: 0x09, options: MapSet.new([])}, + %{name: "Total", page: 0x14, token: 0x0A, options: MapSet.new([])}, + %{name: "Properties", page: 0x14, token: 0x0B, options: MapSet.new([])}, + %{name: "Data", page: 0x14, token: 0x0C, options: MapSet.new([])}, + %{name: "Status", page: 0x14, token: 0x0D, options: MapSet.new([])}, + %{name: "Response", page: 0x14, token: 0x0E, options: MapSet.new([])}, + %{name: "Version", page: 0x14, token: 0x0F, options: MapSet.new([])}, + %{name: "Schema", page: 0x14, token: 0x10, options: MapSet.new([])}, + %{name: "Part", page: 0x14, token: 0x11, options: MapSet.new([])}, + %{name: "EmptyFolderContents", page: 0x14, token: 0x12, options: MapSet.new([])}, + %{name: "DeleteSubFolders", page: 0x14, token: 0x13, options: MapSet.new([])}, + %{name: "UserName", page: 0x14, token: 0x14, options: MapSet.new([])}, + %{name: "Password", page: 0x14, token: 0x15, options: MapSet.new([])}, + %{name: "Move", page: 0x14, token: 0x16, options: MapSet.new([])}, + %{name: "DstFldId", page: 0x14, token: 0x17, options: MapSet.new([])}, + %{name: "ConversationId", page: 0x14, token: 0x18, options: MapSet.new([:binary])}, + %{name: "MoveAlways", page: 0x14, token: 0x19, options: MapSet.new([])}, + %{name: "SendMail", page: 0x15, token: 0x05, options: MapSet.new([])}, + %{name: "SmartForward", page: 0x15, token: 0x06, options: MapSet.new([])}, + %{name: "SmartReply", page: 0x15, token: 0x07, options: MapSet.new([])}, + %{name: "SaveInSentItems", page: 0x15, token: 0x08, options: MapSet.new([])}, + %{name: "ReplaceMime", page: 0x15, token: 0x09, options: MapSet.new([])}, + %{name: "Source", page: 0x15, token: 0x0B, options: MapSet.new([])}, + %{name: "FolderId", page: 0x15, token: 0x0C, options: MapSet.new([])}, + %{name: "ItemId", page: 0x15, token: 0x0D, options: MapSet.new([])}, + %{name: "LongId", page: 0x15, token: 0x0E, options: MapSet.new([])}, + %{name: "InstanceId", page: 0x15, token: 0x0F, options: MapSet.new([])}, + %{name: "MIME", page: 0x15, token: 0x10, options: MapSet.new([:binary])}, + %{name: "ClientId", page: 0x15, token: 0x11, options: MapSet.new([])}, + %{name: "Status", page: 0x15, token: 0x12, options: MapSet.new([])}, + %{name: "AccountId", page: 0x15, token: 0x13, options: MapSet.new([])}, + %{name: "Forwardees", page: 0x15, token: 0x15, options: MapSet.new([])}, + %{name: "Forwardee", page: 0x15, token: 0x16, options: MapSet.new([])}, + %{name: "ForwardeeName", page: 0x15, token: 0x17, options: MapSet.new([])}, + %{name: "ForwardeeEmail", page: 0x15, token: 0x18, options: MapSet.new([])}, + %{name: "UmCallerID", page: 0x16, token: 0x05, options: MapSet.new([])}, + %{name: "UmUserNotes", page: 0x16, token: 0x06, options: MapSet.new([])}, + %{name: "UmAttDuration", page: 0x16, token: 0x07, options: MapSet.new([])}, + %{name: "UmAttOrder", page: 0x16, token: 0x08, options: MapSet.new([])}, + %{name: "ConversationId", page: 0x16, token: 0x09, options: MapSet.new([:binary])}, + %{name: "ConversationIndex", page: 0x16, token: 0x0A, options: MapSet.new([:binary])}, + %{name: "LastVerbExecuted", page: 0x16, token: 0x0B, options: MapSet.new([])}, + %{name: "LastVerbExecutionTime", page: 0x16, token: 0x0C, options: MapSet.new([])}, + %{name: "ReceivedAsBcc", page: 0x16, token: 0x0D, options: MapSet.new([])}, + %{name: "Sender", page: 0x16, token: 0x0E, options: MapSet.new([])}, + %{name: "CalendarType", page: 0x16, token: 0x0F, options: MapSet.new([])}, + %{name: "IsLeapMonth", page: 0x16, token: 0x10, options: MapSet.new([])}, + %{name: "AccountId", page: 0x16, token: 0x11, options: MapSet.new([])}, + %{name: "FirstDayOfWeek", page: 0x16, token: 0x12, options: MapSet.new([])}, + %{name: "MeetingMessageType", page: 0x16, token: 0x13, options: MapSet.new([])}, + %{name: "IsDraft", page: 0x16, token: 0x15, options: MapSet.new([])}, + %{name: "Bcc", page: 0x16, token: 0x16, options: MapSet.new([])}, + %{name: "Send", page: 0x16, token: 0x17, options: MapSet.new([])}, + %{name: "Subject", page: 0x17, token: 0x05, options: MapSet.new([])}, + %{name: "MessageClass", page: 0x17, token: 0x06, options: MapSet.new([])}, + %{name: "LastModifiedDate", page: 0x17, token: 0x07, options: MapSet.new([])}, + %{name: "Categories", page: 0x17, token: 0x08, options: MapSet.new([])}, + %{name: "Category", page: 0x17, token: 0x09, options: MapSet.new([])}, + %{name: "RightsManagementSupport", page: 0x18, token: 0x05, options: MapSet.new([])}, + %{name: "RightsManagementTemplates", page: 0x18, token: 0x06, options: MapSet.new([])}, + %{name: "RightsManagementTemplate", page: 0x18, token: 0x07, options: MapSet.new([])}, + %{name: "RightsManagementLicense", page: 0x18, token: 0x08, options: MapSet.new([])}, + %{name: "EditAllowed", page: 0x18, token: 0x09, options: MapSet.new([])}, + %{name: "ReplyAllowed", page: 0x18, token: 0x0A, options: MapSet.new([])}, + %{name: "ReplyAllAllowed", page: 0x18, token: 0x0B, options: MapSet.new([])}, + %{name: "ForwardAllowed", page: 0x18, token: 0x0C, options: MapSet.new([])}, + %{name: "ModifyRecipientsAllowed", page: 0x18, token: 0x0D, options: MapSet.new([])}, + %{name: "ExtractAllowed", page: 0x18, token: 0x0E, options: MapSet.new([])}, + %{name: "PrintAllowed", page: 0x18, token: 0x0F, options: MapSet.new([])}, + %{name: "ExportAllowed", page: 0x18, token: 0x10, options: MapSet.new([])}, + %{name: "ProgrammaticAccessAllowed", page: 0x18, token: 0x11, options: MapSet.new([])}, + %{name: "RMOwner", page: 0x18, token: 0x12, options: MapSet.new([])}, + %{name: "ContentExpiryDate", page: 0x18, token: 0x13, options: MapSet.new([])}, + %{name: "TemplateID", page: 0x18, token: 0x14, options: MapSet.new([])}, + %{name: "TemplateName", page: 0x18, token: 0x15, options: MapSet.new([])}, + %{name: "TemplateDescription", page: 0x18, token: 0x16, options: MapSet.new([])}, + %{name: "ContentOwner", page: 0x18, token: 0x17, options: MapSet.new([])}, + %{ + name: "RemoveRightsManagementDistribution", + page: 0x18, + token: 0x18, + options: MapSet.new([]) + }, + %{name: "Find", page: 0x19, token: 0x05, options: MapSet.new([])}, + %{name: "SearchId", page: 0x19, token: 0x06, options: MapSet.new([])}, + %{name: "ExecuteSearch", page: 0x19, token: 0x07, options: MapSet.new([])}, + %{name: "MailBoxSearchCriterion", page: 0x19, token: 0x08, options: MapSet.new([])}, + %{name: "Query", page: 0x19, token: 0x09, options: MapSet.new([])}, + %{name: "Status", page: 0x19, token: 0x0A, options: MapSet.new([])}, + %{name: "FreeText", page: 0x19, token: 0x0B, options: MapSet.new([])}, + %{name: "Options", page: 0x19, token: 0x0C, options: MapSet.new([])}, + %{name: "Range", page: 0x19, token: 0x0D, options: MapSet.new([])}, + %{name: "DeepTraversal", page: 0x19, token: 0x0E, options: MapSet.new([])}, + %{name: "Response", page: 0x19, token: 0x11, options: MapSet.new([])}, + %{name: "Result", page: 0x19, token: 0x12, options: MapSet.new([])}, + %{name: "Properties", page: 0x19, token: 0x13, options: MapSet.new([])}, + %{name: "Preview", page: 0x19, token: 0x14, options: MapSet.new([])}, + %{name: "HasAttachments", page: 0x19, token: 0x15, options: MapSet.new([])}, + %{name: "Total", page: 0x19, token: 0x16, options: MapSet.new([])}, + %{name: "DisplayCc", page: 0x19, token: 0x17, options: MapSet.new([])}, + %{name: "DisplayBcc", page: 0x19, token: 0x18, options: MapSet.new([])}, + %{name: "GalSearchCriterion", page: 0x19, token: 0x19, options: MapSet.new([])}, + %{name: "MaxPictures", page: 0x19, token: 0x20, options: MapSet.new([])}, + %{name: "MaxSize", page: 0x19, token: 0x21, options: MapSet.new([])}, + %{name: "Picture", page: 0x19, token: 0x22, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [ + %{uri: "http://synce.org/formats/airsync_wm5/airsync", page: 0x00}, + %{uri: "http://synce.org/formats/airsync_wm5/contacts", page: 0x01}, + %{uri: "http://synce.org/formats/airsync_wm5/email", page: 0x02}, + %{uri: "http://synce.org/formats/airsync_wm5/airnotify", page: 0x03}, + %{uri: "http://synce.org/formats/airsync_wm5/calendar", page: 0x04}, + %{uri: "http://synce.org/formats/airsync_wm5/move", page: 0x05}, + %{uri: "http://synce.org/formats/airsync_wm5/itemestimate", page: 0x06}, + %{uri: "http://synce.org/formats/airsync_wm5/folderhierarchy", page: 0x07}, + %{uri: "http://synce.org/formats/airsync_wm5/meetingresponse", page: 0x08}, + %{uri: "http://synce.org/formats/airsync_wm5/tasks", page: 0x09}, + %{uri: "http://synce.org/formats/airsync_wm5/resolverecipients", page: 0x0A}, + %{uri: "http://synce.org/formats/airsync_wm5/validatecert", page: 0x0B}, + %{uri: "http://synce.org/formats/airsync_wm5/contacts2", page: 0x0C}, + %{uri: "http://synce.org/formats/airsync_wm5/ping", page: 0x0D}, + %{uri: "http://synce.org/formats/airsync_wm5/provision", page: 0x0E}, + %{uri: "http://synce.org/formats/airsync_wm5/search", page: 0x0F}, + %{uri: "http://synce.org/formats/airsync_wm5/gal", page: 0x10}, + %{uri: "http://synce.org/formats/airsync_wm5/airsyncbase", page: 0x11}, + %{uri: "http://synce.org/formats/airsync_wm5/settings", page: 0x12}, + %{uri: "http://synce.org/formats/airsync_wm5/documentlibrary", page: 0x13}, + %{uri: "http://synce.org/formats/airsync_wm5/itemoperations", page: 0x14}, + %{uri: "http://synce.org/formats/airsync_wm5/composemail", page: 0x15}, + %{uri: "http://synce.org/formats/airsync_wm5/email2", page: 0x16}, + %{uri: "http://synce.org/formats/airsync_wm5/notes", page: 0x17}, + %{uri: "http://synce.org/formats/airsync_wm5/rightsmanagement", page: 0x18}, + %{uri: "http://synce.org/formats/airsync_wm5/find", page: 0x19} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "Version", value_prefix: "1.1", page: 0x03, token: 0x05} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/channel11.ex b/lib/libwbxml/tables/generated/channel11.ex new file mode 100644 index 0000000..af0725c --- /dev/null +++ b/lib/libwbxml/tables/generated/channel11.ex @@ -0,0 +1,74 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Channel11 do + @moduledoc false + # WBXML token tables for language `:channel11` (WBXMLLanguage value 1203). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :channel11 + def lang_id, do: 1203 + + @public_id %{ + wbxml_public_id: 0x08, + xml_public_id: "-//WAPFORUM//DTD CHANNEL 1.1//EN", + root_element: "channel", + dtd: "" + } + def public_id, do: @public_id + + @tags [ + %{name: "channel", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "title", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "abstract", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "resource", page: 0x00, token: 0x08, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "maxspace", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "base", value_prefix: nil, page: 0x00, token: 0x06}, + %{name: "href", value_prefix: nil, page: 0x00, token: 0x07}, + %{name: "href", value_prefix: "http://", page: 0x00, token: 0x08}, + %{name: "href", value_prefix: "https://", page: 0x00, token: 0x09}, + %{name: "lastmod", value_prefix: nil, page: 0x00, token: 0x0A}, + %{name: "etag", value_prefix: nil, page: 0x00, token: 0x0B}, + %{name: "md5", value_prefix: nil, page: 0x00, token: 0x0C}, + %{name: "success", value_prefix: nil, page: 0x00, token: 0x0D}, + %{name: "success", value_prefix: "http://", page: 0x00, token: 0x0E}, + %{name: "success", value_prefix: "https://", page: 0x00, token: 0x0F}, + %{name: "failure", value_prefix: nil, page: 0x00, token: 0x10}, + %{name: "failure", value_prefix: "http://", page: 0x00, token: 0x11}, + %{name: "failure", value_prefix: "https://", page: 0x00, token: 0x12}, + %{name: "EventId", value_prefix: nil, page: 0x00, token: 0x13} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/channel12.ex b/lib/libwbxml/tables/generated/channel12.ex new file mode 100644 index 0000000..6cf9729 --- /dev/null +++ b/lib/libwbxml/tables/generated/channel12.ex @@ -0,0 +1,77 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Channel12 do + @moduledoc false + # WBXML token tables for language `:channel12` (WBXMLLanguage value 1204). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :channel12 + def lang_id, do: 1204 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: "-//WAPFORUM//DTD CHANNEL 1.2//EN", + root_element: "channel", + dtd: "http://www.wapforum.org/DTD/channel12.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "channel", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "title", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "abstract", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "resource", page: 0x00, token: 0x08, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "maxspace", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "base", value_prefix: nil, page: 0x00, token: 0x06}, + %{name: "href", value_prefix: nil, page: 0x00, token: 0x07}, + %{name: "href", value_prefix: "http://", page: 0x00, token: 0x08}, + %{name: "href", value_prefix: "https://", page: 0x00, token: 0x09}, + %{name: "lastmod", value_prefix: nil, page: 0x00, token: 0x0A}, + %{name: "etag", value_prefix: nil, page: 0x00, token: 0x0B}, + %{name: "md5", value_prefix: nil, page: 0x00, token: 0x0C}, + %{name: "success", value_prefix: nil, page: 0x00, token: 0x0D}, + %{name: "success", value_prefix: "http://", page: 0x00, token: 0x0E}, + %{name: "success", value_prefix: "https://", page: 0x00, token: 0x0F}, + %{name: "failure", value_prefix: nil, page: 0x00, token: 0x10}, + %{name: "failure", value_prefix: "http://", page: 0x00, token: 0x11}, + %{name: "failure", value_prefix: "https://", page: 0x00, token: 0x12}, + %{name: "eventid", value_prefix: nil, page: 0x00, token: 0x13}, + %{name: "eventid", value_prefix: "wtaev-", page: 0x00, token: 0x14}, + %{name: "channelid", value_prefix: nil, page: 0x00, token: 0x15}, + %{name: "useraccessible", value_prefix: nil, page: 0x00, token: 0x16} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/co10.ex b/lib/libwbxml/tables/generated/co10.ex new file mode 100644 index 0000000..b93c56f --- /dev/null +++ b/lib/libwbxml/tables/generated/co10.ex @@ -0,0 +1,68 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Co10 do + @moduledoc false + # WBXML token tables for language `:co10` (WBXMLLanguage value 1501). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :co10 + def lang_id, do: 1501 + + @public_id %{ + wbxml_public_id: 0x07, + xml_public_id: "-//WAPFORUM//DTD CO 1.0//EN", + root_element: "co", + dtd: "http://www.wapforum.org/DTD/co_1.0.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "co", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "invalidate-object", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "invalidate-service", page: 0x00, token: 0x07, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "uri", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "uri", value_prefix: "http://www.", page: 0x00, token: 0x07}, + %{name: "uri", value_prefix: "http://", page: 0x00, token: 0x06}, + %{name: "uri", value_prefix: "https://www.", page: 0x00, token: 0x09}, + %{name: "uri", value_prefix: "https://", page: 0x00, token: 0x08} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: ".com/", page: 0x00, token: 0x85}, + %{value: ".edu/", page: 0x00, token: 0x86}, + %{value: ".net/", page: 0x00, token: 0x87}, + %{value: ".org/", page: 0x00, token: 0x88} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/conml.ex b/lib/libwbxml/tables/generated/conml.ex new file mode 100644 index 0000000..ff4f500 --- /dev/null +++ b/lib/libwbxml/tables/generated/conml.ex @@ -0,0 +1,110 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Conml do + @moduledoc false + # WBXML token tables for language `:conml` (WBXMLLanguage value 2501). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :conml + def lang_id, do: 2501 + + @public_id %{ + wbxml_public_id: 0x8F, + xml_public_id: "-//CONML//DTD ConML//EN", + root_element: "ConML", + dtd: "http://www.nokia.com/" + } + def public_id, do: @public_id + + @tags [ + %{name: "All", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "Application", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "Applications", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "Unknown_0x08", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "Cancel", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "Complete", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "ConML", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "Data", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "Unknown_0x0d", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "Unknown_0x0e", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "Unknown_0x0f", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "DeviceInfo", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "Unknown_0x11", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "Drives", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "Execute", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "Unknown_0x14", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "Unknown_0x15", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "Unknown_0x16", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "GetDataSize", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "GetStatus", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "HasFiles", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "ID", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "IncType", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "Install", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "InstParams", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "ListInstalledApps", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "Unknown_0x20", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "MaxObjectSize", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "Modified", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "MoreData", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "Name", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "PackageInfo", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "Param", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "PartialType", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "Progress", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "Reboot", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "Unknown_0x2a", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "Unknown_0x2b", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "Results", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "Unknown_0x2d", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "Unknown_0x2e", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "Unknown_0x2f", page: 0x00, token: 0x2F, options: MapSet.new([])}, + %{name: "Unknown_0x30", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "Status", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "Unknown_0x32", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "Unknown_0x33", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "Unknown_0x34", page: 0x00, token: 0x34, options: MapSet.new([])}, + %{name: "Task", page: 0x00, token: 0x35, options: MapSet.new([])}, + %{name: "Unknown_0x36", page: 0x00, token: 0x36, options: MapSet.new([])}, + %{name: "Type", page: 0x00, token: 0x37, options: MapSet.new([])}, + %{name: "UID", page: 0x00, token: 0x38, options: MapSet.new([])}, + %{name: "UnInstall", page: 0x00, token: 0x39, options: MapSet.new([])}, + %{name: "Unknown_0x3a", page: 0x00, token: 0x3A, options: MapSet.new([])}, + %{name: "Unknown_0x3b", page: 0x00, token: 0x3B, options: MapSet.new([])}, + %{name: "Value", page: 0x00, token: 0x3C, options: MapSet.new([])}, + %{name: "Version", page: 0x00, token: 0x3D, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/devinf10.ex b/lib/libwbxml/tables/generated/devinf10.ex new file mode 100644 index 0000000..ea8d95f --- /dev/null +++ b/lib/libwbxml/tables/generated/devinf10.ex @@ -0,0 +1,49 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Devinf10 do + @moduledoc false + # WBXML token tables for language `:devinf10` (WBXMLLanguage value 2002). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :devinf10 + def lang_id, do: 2002 + + @public_id %{ + wbxml_public_id: 0xFD2, + xml_public_id: "-//SYNCML//DTD DevInf 1.0//EN", + root_element: "DevInf", + dtd: "http://www.syncml.org/docs/syncml_devinf_v10_20001207.dtd" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.Devinf11 in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.Devinf11 + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.Devinf11 + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.Devinf11 + + # Shared with Libwbxml.Tables.Generated.Devinf11 in C. + defdelegate namespaces(), to: Libwbxml.Tables.Generated.Devinf11 + defdelegate namespace_by_page(), to: Libwbxml.Tables.Generated.Devinf11 + defdelegate page_by_namespace(), to: Libwbxml.Tables.Generated.Devinf11 + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/devinf11.ex b/lib/libwbxml/tables/generated/devinf11.ex new file mode 100644 index 0000000..d8add76 --- /dev/null +++ b/lib/libwbxml/tables/generated/devinf11.ex @@ -0,0 +1,94 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Devinf11 do + @moduledoc false + # WBXML token tables for language `:devinf11` (WBXMLLanguage value 2102). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :devinf11 + def lang_id, do: 2102 + + @public_id %{ + wbxml_public_id: 0xFD4, + xml_public_id: "-//SYNCML//DTD DevInf 1.1//EN", + root_element: "DevInf", + dtd: "http://www.syncml.org/docs/devinf_v11_20020215.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "CTCap", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "CTType", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "DataStore", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "DataType", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "DevID", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "DevInf", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "DevTyp", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "DSMem", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "Ext", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "FwV", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "HwV", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "Man", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "MaxGUIDSize", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "MaxID", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "MaxMem", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "Mod", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "OEM", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "ParamName", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "PropName", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "Rx", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "Rx-Pref", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "SharedMem", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "Size", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "SourceRef", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "SwV", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "SyncCap", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "SyncType", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "Tx", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "Tx-Pref", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "ValEnum", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "VerCT", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "VerDTD", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "XNam", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "XVal", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "UTC", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "SupportNumberOfChanges", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "SupportLargeObjs", page: 0x00, token: 0x2A, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [ + %{uri: "syncml:devinf", page: 0x00} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/devinf12.ex b/lib/libwbxml/tables/generated/devinf12.ex new file mode 100644 index 0000000..199569a --- /dev/null +++ b/lib/libwbxml/tables/generated/devinf12.ex @@ -0,0 +1,103 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Devinf12 do + @moduledoc false + # WBXML token tables for language `:devinf12` (WBXMLLanguage value 2202). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :devinf12 + def lang_id, do: 2202 + + @public_id %{ + wbxml_public_id: 0x1203, + xml_public_id: "-//SYNCML//DTD DevInf 1.2//EN", + root_element: "DevInf", + dtd: "http://www.openmobilealliance.org/tech/DTD/OMA-SyncML-Device_Information-DTD-1.2.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "CTCap", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "CTType", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "DataStore", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "DataType", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "DevID", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "DevInf", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "DevTyp", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "DisplayName", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "DSMem", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "Ext", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "FwV", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "HwV", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "Man", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "MaxGUIDSize", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "MaxID", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "MaxMem", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "Mod", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "OEM", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "ParamName", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "PropName", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "Rx", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "Rx-Pref", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "SharedMem", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "MaxSize", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "SourceRef", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "SwV", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "SyncCap", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "SyncType", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "Tx", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "Tx-Pref", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "ValEnum", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "VerCT", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "VerDTD", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "XNam", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "XVal", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "UTC", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "SupportNumberOfChanges", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "SupportLargeObjs", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "Property", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "PropParam", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "MaxOccur", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "NoTruncate", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "Filter-Rx", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "FilterCap", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "FilterKeyword", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "FieldLevel", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "SupportHierarchicalSync", page: 0x00, token: 0x34, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [ + %{uri: "syncml:devinf", page: 0x00} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/dmddf12.ex b/lib/libwbxml/tables/generated/dmddf12.ex new file mode 100644 index 0000000..5eb911a --- /dev/null +++ b/lib/libwbxml/tables/generated/dmddf12.ex @@ -0,0 +1,112 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Dmddf12 do + @moduledoc false + # WBXML token tables for language `:dmddf12` (WBXMLLanguage value 2204). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :dmddf12 + def lang_id, do: 2204 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: "-//OMA//DTD-DM-DDF 1.2//EN", + root_element: "MgmtTree", + dtd: "http://www.openmobilealliance.org/tech/DTD/dm_ddf-v1_2.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "AccessType", page: 0x02, token: 0x05, options: MapSet.new([])}, + %{name: "ACL", page: 0x02, token: 0x06, options: MapSet.new([])}, + %{name: "Add", page: 0x02, token: 0x07, options: MapSet.new([])}, + %{name: "b64", page: 0x02, token: 0x08, options: MapSet.new([])}, + %{name: "bin", page: 0x02, token: 0x09, options: MapSet.new([])}, + %{name: "bool", page: 0x02, token: 0x0A, options: MapSet.new([])}, + %{name: "chr", page: 0x02, token: 0x0B, options: MapSet.new([])}, + %{name: "CaseSense", page: 0x02, token: 0x0C, options: MapSet.new([])}, + %{name: "CIS", page: 0x02, token: 0x0D, options: MapSet.new([])}, + %{name: "Copy", page: 0x02, token: 0x0E, options: MapSet.new([])}, + %{name: "CS", page: 0x02, token: 0x0F, options: MapSet.new([])}, + %{name: "date", page: 0x02, token: 0x10, options: MapSet.new([])}, + %{name: "DDFName", page: 0x02, token: 0x11, options: MapSet.new([])}, + %{name: "DefaultValue", page: 0x02, token: 0x12, options: MapSet.new([])}, + %{name: "Delete", page: 0x02, token: 0x13, options: MapSet.new([])}, + %{name: "Description", page: 0x02, token: 0x14, options: MapSet.new([])}, + %{name: "DFFormat", page: 0x02, token: 0x15, options: MapSet.new([])}, + %{name: "DFProperties", page: 0x02, token: 0x16, options: MapSet.new([])}, + %{name: "DFTitle", page: 0x02, token: 0x17, options: MapSet.new([])}, + %{name: "DFType", page: 0x02, token: 0x18, options: MapSet.new([])}, + %{name: "Dynamic", page: 0x02, token: 0x19, options: MapSet.new([])}, + %{name: "Exec", page: 0x02, token: 0x1A, options: MapSet.new([])}, + %{name: "float", page: 0x02, token: 0x1B, options: MapSet.new([])}, + %{name: "Format", page: 0x02, token: 0x1C, options: MapSet.new([])}, + %{name: "Get", page: 0x02, token: 0x1D, options: MapSet.new([])}, + %{name: "int", page: 0x02, token: 0x1E, options: MapSet.new([])}, + %{name: "Man", page: 0x02, token: 0x1F, options: MapSet.new([])}, + %{name: "MgmtTree", page: 0x02, token: 0x20, options: MapSet.new([])}, + %{name: "MIME", page: 0x02, token: 0x21, options: MapSet.new([])}, + %{name: "Mod", page: 0x02, token: 0x22, options: MapSet.new([])}, + %{name: "Name", page: 0x02, token: 0x23, options: MapSet.new([])}, + %{name: "Node", page: 0x02, token: 0x24, options: MapSet.new([])}, + %{name: "node", page: 0x02, token: 0x25, options: MapSet.new([])}, + %{name: "NodeName", page: 0x02, token: 0x26, options: MapSet.new([])}, + %{name: "null", page: 0x02, token: 0x27, options: MapSet.new([])}, + %{name: "Occurrence", page: 0x02, token: 0x28, options: MapSet.new([])}, + %{name: "One", page: 0x02, token: 0x29, options: MapSet.new([])}, + %{name: "OneOrMore", page: 0x02, token: 0x2A, options: MapSet.new([])}, + %{name: "OneOrN", page: 0x02, token: 0x2B, options: MapSet.new([])}, + %{name: "Path", page: 0x02, token: 0x2C, options: MapSet.new([])}, + %{name: "Permanent", page: 0x02, token: 0x2D, options: MapSet.new([])}, + %{name: "Replace", page: 0x02, token: 0x2E, options: MapSet.new([])}, + %{name: "RTProperties", page: 0x02, token: 0x2F, options: MapSet.new([])}, + %{name: "Scope", page: 0x02, token: 0x30, options: MapSet.new([])}, + %{name: "Size", page: 0x02, token: 0x31, options: MapSet.new([])}, + %{name: "time", page: 0x02, token: 0x32, options: MapSet.new([])}, + %{name: "Title", page: 0x02, token: 0x33, options: MapSet.new([])}, + %{name: "TStamp", page: 0x02, token: 0x34, options: MapSet.new([])}, + %{name: "Type", page: 0x02, token: 0x35, options: MapSet.new([])}, + %{name: "Value", page: 0x02, token: 0x36, options: MapSet.new([])}, + %{name: "VerDTD", page: 0x02, token: 0x37, options: MapSet.new([])}, + %{name: "VerNo", page: 0x02, token: 0x38, options: MapSet.new([])}, + %{name: "xml", page: 0x02, token: 0x39, options: MapSet.new([])}, + %{name: "ZeroOrMore", page: 0x02, token: 0x3A, options: MapSet.new([])}, + %{name: "ZeroOrN", page: 0x02, token: 0x3B, options: MapSet.new([])}, + %{name: "ZeroOrOne", page: 0x02, token: 0x3C, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [ + %{uri: "syncml:dmddf1.2", page: 0x02} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/drmrel10.ex b/lib/libwbxml/tables/generated/drmrel10.ex new file mode 100644 index 0000000..29b5c65 --- /dev/null +++ b/lib/libwbxml/tables/generated/drmrel10.ex @@ -0,0 +1,81 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Drmrel10 do + @moduledoc false + # WBXML token tables for language `:drmrel10` (WBXMLLanguage value 1801). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :drmrel10 + def lang_id, do: 1801 + + @public_id %{ + wbxml_public_id: 0x0E, + xml_public_id: "-//OMA//DTD DRMREL 1.0//EN", + root_element: "o-ex:rights", + dtd: "http://www.openmobilealliance.org/DTD/drmrel10.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "o-ex:rights", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "o-ex:context", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "o-dd:version", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "o-dd:uid", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "o-ex:agreement", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "o-ex:asset", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "ds:KeyInfo", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "ds:KeyValue", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "o-ex:permission", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "o-dd:play", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "o-dd:display", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "o-dd:execute", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "o-dd:print", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "o-ex:constraint", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "o-dd:count", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "o-dd:datetime", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "o-dd:start", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "o-dd:end", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "o-dd:interval", page: 0x00, token: 0x17, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "xmlns:o-ex", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "xmlns:o-dd", value_prefix: nil, page: 0x00, token: 0x06}, + %{name: "xmlns:ds", value_prefix: nil, page: 0x00, token: 0x07} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: "http://odrl.net/1.1/ODRL-EX", page: 0x00, token: 0x85}, + %{value: "http://odrl.net/1.1/ODRL-DD", page: 0x00, token: 0x86}, + %{value: "http://www.w3.org/2000/09/xmldsig#/", page: 0x00, token: 0x87} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/emn10.ex b/lib/libwbxml/tables/generated/emn10.ex new file mode 100644 index 0000000..fd96808 --- /dev/null +++ b/lib/libwbxml/tables/generated/emn10.ex @@ -0,0 +1,70 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Emn10 do + @moduledoc false + # WBXML token tables for language `:emn10` (WBXMLLanguage value 1701). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :emn10 + def lang_id, do: 1701 + + @public_id %{ + wbxml_public_id: 0x0D, + xml_public_id: "-//WAPFORUM//DTD EMN 1.0//EN", + root_element: "emn", + dtd: "http://www.wapforum.org/DTD/emn.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "emn", page: 0x00, token: 0x05, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "timestamp", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "mailbox", value_prefix: nil, page: 0x00, token: 0x06}, + %{name: "mailbox", value_prefix: "mailat:", page: 0x00, token: 0x07}, + %{name: "mailbox", value_prefix: "pop://", page: 0x00, token: 0x08}, + %{name: "mailbox", value_prefix: "imap://", page: 0x00, token: 0x09}, + %{name: "mailbox", value_prefix: "http://www.", page: 0x00, token: 0x0B}, + %{name: "mailbox", value_prefix: "http://", page: 0x00, token: 0x0A}, + %{name: "mailbox", value_prefix: "https://www.", page: 0x00, token: 0x0D}, + %{name: "mailbox", value_prefix: "https://", page: 0x00, token: 0x0C} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: ".com", page: 0x00, token: 0x85}, + %{value: ".edu", page: 0x00, token: 0x86}, + %{value: ".net", page: 0x00, token: 0x87}, + %{value: ".org", page: 0x00, token: 0x88} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/index.ex b/lib/libwbxml/tables/generated/index.ex new file mode 100644 index 0000000..b1faaf1 --- /dev/null +++ b/lib/libwbxml/tables/generated/index.ex @@ -0,0 +1,80 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Index do + @moduledoc false + # Language registry: which module holds each language, in the two orders + # that matter (main-table order for searches, enum order for listing). + + # `sv_table_entry[]` order from wbxml_tables.c. Searches that return the + # first match (public ID, system ID, root element) must use this order. + @main_table [ + {:wml10, Libwbxml.Tables.Generated.Wml10}, + {:wml11, Libwbxml.Tables.Generated.Wml11}, + {:wml12, Libwbxml.Tables.Generated.Wml12}, + {:wml13, Libwbxml.Tables.Generated.Wml13}, + {:wta10, Libwbxml.Tables.Generated.Wta10}, + {:wtawml12, Libwbxml.Tables.Generated.Wtawml12}, + {:channel11, Libwbxml.Tables.Generated.Channel11}, + {:channel12, Libwbxml.Tables.Generated.Channel12}, + {:si10, Libwbxml.Tables.Generated.Si10}, + {:sl10, Libwbxml.Tables.Generated.Sl10}, + {:co10, Libwbxml.Tables.Generated.Co10}, + {:prov10, Libwbxml.Tables.Generated.Prov10}, + {:emn10, Libwbxml.Tables.Generated.Emn10}, + {:drmrel10, Libwbxml.Tables.Generated.Drmrel10}, + {:ota_settings, Libwbxml.Tables.Generated.OtaSettings}, + {:syncml12, Libwbxml.Tables.Generated.Syncml12}, + {:devinf12, Libwbxml.Tables.Generated.Devinf12}, + {:metinf12, Libwbxml.Tables.Generated.Metinf12}, + {:dmddf12, Libwbxml.Tables.Generated.Dmddf12}, + {:syncml11, Libwbxml.Tables.Generated.Syncml11}, + {:devinf11, Libwbxml.Tables.Generated.Devinf11}, + {:metinf11, Libwbxml.Tables.Generated.Metinf11}, + {:syncml10, Libwbxml.Tables.Generated.Syncml10}, + {:devinf10, Libwbxml.Tables.Generated.Devinf10}, + {:wv_csp11, Libwbxml.Tables.Generated.WvCsp11}, + {:wv_csp12, Libwbxml.Tables.Generated.WvCsp12}, + {:airsync, Libwbxml.Tables.Generated.Airsync}, + {:activesync, Libwbxml.Tables.Generated.Activesync}, + {:conml, Libwbxml.Tables.Generated.Conml} + ] + def main_table, do: @main_table + + # Languages sorted by their WBXMLLanguage enum value. + @languages [ + :wml10, + :wml11, + :wml12, + :wml13, + :wta10, + :wtawml12, + :channel11, + :channel12, + :si10, + :sl10, + :co10, + :prov10, + :emn10, + :drmrel10, + :ota_settings, + :syncml10, + :devinf10, + :syncml11, + :devinf11, + :metinf11, + :syncml12, + :devinf12, + :metinf12, + :dmddf12, + :wv_csp11, + :wv_csp12, + :airsync, + :activesync, + :conml + ] + def languages, do: @languages + + @module_by_lang Map.new(@main_table) + def module_by_lang, do: @module_by_lang +end diff --git a/lib/libwbxml/tables/generated/metinf11.ex b/lib/libwbxml/tables/generated/metinf11.ex new file mode 100644 index 0000000..d94cc3f --- /dev/null +++ b/lib/libwbxml/tables/generated/metinf11.ex @@ -0,0 +1,71 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Metinf11 do + @moduledoc false + # WBXML token tables for language `:metinf11` (WBXMLLanguage value 2103). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :metinf11 + def lang_id, do: 2103 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: "-//SYNCML//DTD MetInf 1.1//EN", + root_element: "MetInf", + dtd: "http://www.syncml.org/docs/syncml_metinf_v11_20020215.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "Anchor", page: 0x01, token: 0x05, options: MapSet.new([])}, + %{name: "EMI", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "Format", page: 0x01, token: 0x07, options: MapSet.new([])}, + %{name: "FreeID", page: 0x01, token: 0x08, options: MapSet.new([])}, + %{name: "FreeMem", page: 0x01, token: 0x09, options: MapSet.new([])}, + %{name: "Last", page: 0x01, token: 0x0A, options: MapSet.new([])}, + %{name: "Mark", page: 0x01, token: 0x0B, options: MapSet.new([])}, + %{name: "MaxMsgSize", page: 0x01, token: 0x0C, options: MapSet.new([])}, + %{name: "Mem", page: 0x01, token: 0x0D, options: MapSet.new([])}, + %{name: "MetInf", page: 0x01, token: 0x0E, options: MapSet.new([])}, + %{name: "Next", page: 0x01, token: 0x0F, options: MapSet.new([])}, + %{name: "NextNonce", page: 0x01, token: 0x10, options: MapSet.new([])}, + %{name: "SharedMem", page: 0x01, token: 0x11, options: MapSet.new([])}, + %{name: "Size", page: 0x01, token: 0x12, options: MapSet.new([])}, + %{name: "Type", page: 0x01, token: 0x13, options: MapSet.new([])}, + %{name: "Version", page: 0x01, token: 0x14, options: MapSet.new([])}, + %{name: "MaxObjSize", page: 0x01, token: 0x15, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/metinf12.ex b/lib/libwbxml/tables/generated/metinf12.ex new file mode 100644 index 0000000..5af058a --- /dev/null +++ b/lib/libwbxml/tables/generated/metinf12.ex @@ -0,0 +1,72 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Metinf12 do + @moduledoc false + # WBXML token tables for language `:metinf12` (WBXMLLanguage value 2203). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :metinf12 + def lang_id, do: 2203 + + @public_id %{ + wbxml_public_id: 0x1202, + xml_public_id: "-//SYNCML//DTD MetInf 1.2//EN", + root_element: "MetInf", + dtd: "http://www.openmobilealliance.org/tech/DTD/OMA-TS-SyncML_MetaInfo_DTD-V1_2.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "Anchor", page: 0x01, token: 0x05, options: MapSet.new([])}, + %{name: "EMI", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "Format", page: 0x01, token: 0x07, options: MapSet.new([])}, + %{name: "FreeID", page: 0x01, token: 0x08, options: MapSet.new([])}, + %{name: "FreeMem", page: 0x01, token: 0x09, options: MapSet.new([])}, + %{name: "Last", page: 0x01, token: 0x0A, options: MapSet.new([])}, + %{name: "Mark", page: 0x01, token: 0x0B, options: MapSet.new([])}, + %{name: "MaxMsgSize", page: 0x01, token: 0x0C, options: MapSet.new([])}, + %{name: "Mem", page: 0x01, token: 0x0D, options: MapSet.new([])}, + %{name: "MetInf", page: 0x01, token: 0x0E, options: MapSet.new([])}, + %{name: "Next", page: 0x01, token: 0x0F, options: MapSet.new([])}, + %{name: "NextNonce", page: 0x01, token: 0x10, options: MapSet.new([])}, + %{name: "SharedMem", page: 0x01, token: 0x11, options: MapSet.new([])}, + %{name: "Size", page: 0x01, token: 0x12, options: MapSet.new([])}, + %{name: "Type", page: 0x01, token: 0x13, options: MapSet.new([])}, + %{name: "Version", page: 0x01, token: 0x14, options: MapSet.new([])}, + %{name: "MaxObjSize", page: 0x01, token: 0x15, options: MapSet.new([])}, + %{name: "FieldLevel", page: 0x01, token: 0x16, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/ota_settings.ex b/lib/libwbxml/tables/generated/ota_settings.ex new file mode 100644 index 0000000..a8fb680 --- /dev/null +++ b/lib/libwbxml/tables/generated/ota_settings.ex @@ -0,0 +1,112 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.OtaSettings do + @moduledoc false + # WBXML token tables for language `:ota_settings` (WBXMLLanguage value 1901). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :ota_settings + def lang_id, do: 1901 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: nil, + root_element: "CHARACTERISTIC-LIST", + dtd: "characteristic-list.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "CHARACTERISTIC-LIST", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "CHARACTERISTIC", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "PARM", page: 0x00, token: 0x07, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "TYPE", value_prefix: "ADDRESS", page: 0x00, token: 0x06}, + %{name: "TYPE", value_prefix: "URL", page: 0x00, token: 0x07}, + %{name: "TYPE", value_prefix: "NAME", page: 0x00, token: 0x08}, + %{name: "NAME", value_prefix: nil, page: 0x00, token: 0x10}, + %{name: "VALUE", value_prefix: nil, page: 0x00, token: 0x11}, + %{name: "NAME", value_prefix: "BEARER", page: 0x00, token: 0x12}, + %{name: "NAME", value_prefix: "PROXY", page: 0x00, token: 0x13}, + %{name: "NAME", value_prefix: "PORT", page: 0x00, token: 0x14}, + %{name: "NAME", value_prefix: "NAME", page: 0x00, token: 0x15}, + %{name: "NAME", value_prefix: "PROXY_TYPE", page: 0x00, token: 0x16}, + %{name: "NAME", value_prefix: "URL", page: 0x00, token: 0x17}, + %{name: "NAME", value_prefix: "PROXY_AUTHNAME", page: 0x00, token: 0x18}, + %{name: "NAME", value_prefix: "PROXY_AUTHSECRET", page: 0x00, token: 0x19}, + %{name: "NAME", value_prefix: "SMS_SMSC_ADDRESS", page: 0x00, token: 0x1A}, + %{name: "NAME", value_prefix: "USSD_SERVICE_CODE", page: 0x00, token: 0x1B}, + %{name: "NAME", value_prefix: "GPRS_ACCESSPOINTNAME", page: 0x00, token: 0x1C}, + %{name: "NAME", value_prefix: "PPP_LOGINTYPE", page: 0x00, token: 0x1D}, + %{name: "NAME", value_prefix: "PROXY_LOGINTYPE", page: 0x00, token: 0x1E}, + %{name: "NAME", value_prefix: "CSD_DIALSTRING", page: 0x00, token: 0x21}, + %{name: "NAME", value_prefix: "CSD_CALLTYPE", page: 0x00, token: 0x28}, + %{name: "NAME", value_prefix: "CSD_CALLSPEED", page: 0x00, token: 0x29}, + %{name: "NAME", value_prefix: "PPP_AUTHTYPE", page: 0x00, token: 0x22}, + %{name: "NAME", value_prefix: "PPP_AUTHNAME", page: 0x00, token: 0x23}, + %{name: "NAME", value_prefix: "PPP_AUTHSECRET", page: 0x00, token: 0x24}, + %{name: "VALUE", value_prefix: "GSM/CSD", page: 0x00, token: 0x45}, + %{name: "VALUE", value_prefix: "GSM/SMS", page: 0x00, token: 0x46}, + %{name: "VALUE", value_prefix: "GSM/USSD", page: 0x00, token: 0x47}, + %{name: "VALUE", value_prefix: "IS-136/CSD", page: 0x00, token: 0x48}, + %{name: "VALUE", value_prefix: "GPRS", page: 0x00, token: 0x49}, + %{name: "VALUE", value_prefix: "9200", page: 0x00, token: 0x60}, + %{name: "VALUE", value_prefix: "9201", page: 0x00, token: 0x61}, + %{name: "VALUE", value_prefix: "9202", page: 0x00, token: 0x62}, + %{name: "VALUE", value_prefix: "9203", page: 0x00, token: 0x63}, + %{name: "VALUE", value_prefix: "AUTOMATIC", page: 0x00, token: 0x64}, + %{name: "VALUE", value_prefix: "MANUAL", page: 0x00, token: 0x65}, + %{name: "VALUE", value_prefix: "AUTO", page: 0x00, token: 0x6A}, + %{name: "VALUE", value_prefix: "9600", page: 0x00, token: 0x6B}, + %{name: "VALUE", value_prefix: "14400", page: 0x00, token: 0x6C}, + %{name: "VALUE", value_prefix: "19200", page: 0x00, token: 0x6D}, + %{name: "VALUE", value_prefix: "28800", page: 0x00, token: 0x6E}, + %{name: "VALUE", value_prefix: "38400", page: 0x00, token: 0x6F}, + %{name: "VALUE", value_prefix: "PAP", page: 0x00, token: 0x70}, + %{name: "VALUE", value_prefix: "CHAP", page: 0x00, token: 0x71}, + %{name: "VALUE", value_prefix: "ANALOGUE", page: 0x00, token: 0x72}, + %{name: "VALUE", value_prefix: "ISDN", page: 0x00, token: 0x73}, + %{name: "VALUE", value_prefix: "43200", page: 0x00, token: 0x74}, + %{name: "VALUE", value_prefix: "57600", page: 0x00, token: 0x75}, + %{name: "VALUE", value_prefix: "MSISDN_NO", page: 0x00, token: 0x76}, + %{name: "VALUE", value_prefix: "IPV4", page: 0x00, token: 0x77}, + %{name: "VALUE", value_prefix: "MS_CHAP", page: 0x00, token: 0x78}, + %{name: "TYPE", value_prefix: "MMSURL", page: 0x00, token: 0x7C}, + %{name: "TYPE", value_prefix: "ID", page: 0x00, token: 0x7D}, + %{name: "NAME", value_prefix: "ISP_NAME", page: 0x00, token: 0x7E}, + %{name: "TYPE", value_prefix: "BOOKMARK", page: 0x00, token: 0x7F} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/prov10.ex b/lib/libwbxml/tables/generated/prov10.ex new file mode 100644 index 0000000..f632a39 --- /dev/null +++ b/lib/libwbxml/tables/generated/prov10.ex @@ -0,0 +1,238 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Prov10 do + @moduledoc false + # WBXML token tables for language `:prov10` (WBXMLLanguage value 1601). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :prov10 + def lang_id, do: 1601 + + @public_id %{ + wbxml_public_id: 0x0B, + xml_public_id: "-//WAPFORUM//DTD PROV 1.0//EN", + root_element: "wap-provisioningdoc", + dtd: "http://www.wapforum.org/DTD/prov.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "wap-provisioningdoc", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "characteristic", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "parm", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "characteristic", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "parm", page: 0x01, token: 0x07, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "version", value_prefix: nil, page: 0x00, token: 0x45}, + %{name: "version", value_prefix: "1.0", page: 0x00, token: 0x46}, + %{name: "type", value_prefix: nil, page: 0x00, token: 0x50}, + %{name: "type", value_prefix: "PXLOGICAL", page: 0x00, token: 0x51}, + %{name: "type", value_prefix: "PXPHYSICAL", page: 0x00, token: 0x52}, + %{name: "type", value_prefix: "PORT", page: 0x00, token: 0x53}, + %{name: "type", value_prefix: "VALIDITY", page: 0x00, token: 0x54}, + %{name: "type", value_prefix: "NAPDEF", page: 0x00, token: 0x55}, + %{name: "type", value_prefix: "BOOTSTRAP", page: 0x00, token: 0x56}, + %{name: "type", value_prefix: "VENDORCONFIG", page: 0x00, token: 0x57}, + %{name: "type", value_prefix: "CLIENTIDENTITY", page: 0x00, token: 0x58}, + %{name: "type", value_prefix: "PXAUTHINFO", page: 0x00, token: 0x59}, + %{name: "type", value_prefix: "NAPAUTHINFO", page: 0x00, token: 0x5A}, + %{name: "type", value_prefix: "ACCESS", page: 0x00, token: 0x5B}, + %{name: "type", value_prefix: nil, page: 0x01, token: 0x50}, + %{name: "type", value_prefix: "PORT", page: 0x01, token: 0x53}, + %{name: "type", value_prefix: "CLIENTIDENTITY", page: 0x01, token: 0x58}, + %{name: "type", value_prefix: "APPLICATION", page: 0x01, token: 0x55}, + %{name: "type", value_prefix: "APPADDR", page: 0x01, token: 0x56}, + %{name: "type", value_prefix: "APPAUTH", page: 0x01, token: 0x57}, + %{name: "type", value_prefix: "RESOURCE", page: 0x01, token: 0x59}, + %{name: "name", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "value", value_prefix: nil, page: 0x00, token: 0x06}, + %{name: "name", value_prefix: "NAME", page: 0x00, token: 0x07}, + %{name: "name", value_prefix: "NAP-ADDRESS", page: 0x00, token: 0x08}, + %{name: "name", value_prefix: "NAP-ADDRTYPE", page: 0x00, token: 0x09}, + %{name: "name", value_prefix: "CALLTYPE", page: 0x00, token: 0x0A}, + %{name: "name", value_prefix: "VALIDUNTIL", page: 0x00, token: 0x0B}, + %{name: "name", value_prefix: "AUTHTYPE", page: 0x00, token: 0x0C}, + %{name: "name", value_prefix: "AUTHNAME", page: 0x00, token: 0x0D}, + %{name: "name", value_prefix: "AUTHSECRET", page: 0x00, token: 0x0E}, + %{name: "name", value_prefix: "LINGER", page: 0x00, token: 0x0F}, + %{name: "name", value_prefix: "BEARER", page: 0x00, token: 0x10}, + %{name: "name", value_prefix: "NAPID", page: 0x00, token: 0x11}, + %{name: "name", value_prefix: "COUNTRY", page: 0x00, token: 0x12}, + %{name: "name", value_prefix: "NETWORK", page: 0x00, token: 0x13}, + %{name: "name", value_prefix: "INTERNET", page: 0x00, token: 0x14}, + %{name: "name", value_prefix: "PROXY-ID", page: 0x00, token: 0x15}, + %{name: "name", value_prefix: "PROXY-PROVIDER-ID", page: 0x00, token: 0x16}, + %{name: "name", value_prefix: "DOMAIN", page: 0x00, token: 0x17}, + %{name: "name", value_prefix: "PROVURL", page: 0x00, token: 0x18}, + %{name: "name", value_prefix: "PXAUTH-TYPE", page: 0x00, token: 0x19}, + %{name: "name", value_prefix: "PXAUTH-ID", page: 0x00, token: 0x1A}, + %{name: "name", value_prefix: "PXAUTH-PW", page: 0x00, token: 0x1B}, + %{name: "name", value_prefix: "STARTPAGE", page: 0x00, token: 0x1C}, + %{name: "name", value_prefix: "BASAUTH-ID", page: 0x00, token: 0x1D}, + %{name: "name", value_prefix: "BASAUTH-PW", page: 0x00, token: 0x1E}, + %{name: "name", value_prefix: "PUSHENABLED", page: 0x00, token: 0x1F}, + %{name: "name", value_prefix: "PXADDR", page: 0x00, token: 0x20}, + %{name: "name", value_prefix: "PXADDRTYPE", page: 0x00, token: 0x21}, + %{name: "name", value_prefix: "TO-NAPID", page: 0x00, token: 0x22}, + %{name: "name", value_prefix: "PORTNBR", page: 0x00, token: 0x23}, + %{name: "name", value_prefix: "SERVICE", page: 0x00, token: 0x24}, + %{name: "name", value_prefix: "LINKSPEED", page: 0x00, token: 0x25}, + %{name: "name", value_prefix: "DNLINKSPEED", page: 0x00, token: 0x26}, + %{name: "name", value_prefix: "LOCAL-ADDR", page: 0x00, token: 0x27}, + %{name: "name", value_prefix: "LOCAL-ADDRTYPE", page: 0x00, token: 0x28}, + %{name: "name", value_prefix: "CONTEXT-ALLOW", page: 0x00, token: 0x29}, + %{name: "name", value_prefix: "TRUST", page: 0x00, token: 0x2A}, + %{name: "name", value_prefix: "MASTER", page: 0x00, token: 0x2B}, + %{name: "name", value_prefix: "SID", page: 0x00, token: 0x2C}, + %{name: "name", value_prefix: "SOC", page: 0x00, token: 0x2D}, + %{name: "name", value_prefix: "WSP-VERSION", page: 0x00, token: 0x2E}, + %{name: "name", value_prefix: "PHYSICAL-PROXY-ID", page: 0x00, token: 0x2F}, + %{name: "name", value_prefix: "CLIENT-ID", page: 0x00, token: 0x30}, + %{name: "name", value_prefix: "DELIVERY-ERR-SDU", page: 0x00, token: 0x31}, + %{name: "name", value_prefix: "DELIVERY-ORDER", page: 0x00, token: 0x32}, + %{name: "name", value_prefix: "TRAFFIC-CLASS", page: 0x00, token: 0x33}, + %{name: "name", value_prefix: "MAX-SDU-SIZE", page: 0x00, token: 0x34}, + %{name: "name", value_prefix: "MAX-BITRATE-UPLINK", page: 0x00, token: 0x35}, + %{name: "name", value_prefix: "MAX-BITRATE-DNLINK", page: 0x00, token: 0x36}, + %{name: "name", value_prefix: "RESIDUAL-BER", page: 0x00, token: 0x37}, + %{name: "name", value_prefix: "SDU-ERROR-RATIO", page: 0x00, token: 0x38}, + %{name: "name", value_prefix: "TRAFFIC-HANDL-PRIO", page: 0x00, token: 0x39}, + %{name: "name", value_prefix: "TRANSFER-DELAY", page: 0x00, token: 0x3A}, + %{name: "name", value_prefix: "GUARANTEED-BITRATE-UPLINK", page: 0x00, token: 0x3B}, + %{name: "name", value_prefix: "GUARANTEED-BITRATE-DNLINK", page: 0x00, token: 0x3C}, + %{name: "name", value_prefix: "PXADDR-FQDN", page: 0x00, token: 0x3D}, + %{name: "name", value_prefix: "PROXY-PW", page: 0x00, token: 0x3E}, + %{name: "name", value_prefix: "PPGAUTH-TYPE", page: 0x00, token: 0x3F}, + %{name: "name", value_prefix: "PULLENABLED", page: 0x00, token: 0x47}, + %{name: "name", value_prefix: "DNS-ADDR", page: 0x00, token: 0x48}, + %{name: "name", value_prefix: "MAX-NUM-RETRY", page: 0x00, token: 0x49}, + %{name: "name", value_prefix: "FIRST-RETRY-TIMEOUT", page: 0x00, token: 0x4A}, + %{name: "name", value_prefix: "REREG-THRESHOLD", page: 0x00, token: 0x4B}, + %{name: "name", value_prefix: "T-BIT", page: 0x00, token: 0x4C}, + %{name: "name", value_prefix: "AUTH-ENTITY", page: 0x00, token: 0x4E}, + %{name: "name", value_prefix: "SPI", page: 0x00, token: 0x4F}, + %{name: "name", value_prefix: nil, page: 0x01, token: 0x05}, + %{name: "value", value_prefix: nil, page: 0x01, token: 0x06}, + %{name: "name", value_prefix: "NAME", page: 0x01, token: 0x07}, + %{name: "name", value_prefix: "INTERNET", page: 0x01, token: 0x14}, + %{name: "name", value_prefix: "STARTPAGE", page: 0x01, token: 0x1C}, + %{name: "name", value_prefix: "TO-NAPID", page: 0x01, token: 0x22}, + %{name: "name", value_prefix: "PORTNBR", page: 0x01, token: 0x23}, + %{name: "name", value_prefix: "SERVICE", page: 0x01, token: 0x24}, + %{name: "name", value_prefix: "AACCEPT", page: 0x01, token: 0x2E}, + %{name: "name", value_prefix: "AAUTHDATA", page: 0x01, token: 0x2F}, + %{name: "name", value_prefix: "AAUTHLEVEL", page: 0x01, token: 0x30}, + %{name: "name", value_prefix: "AAUTHNAME", page: 0x01, token: 0x31}, + %{name: "name", value_prefix: "AAUTHSECRET", page: 0x01, token: 0x32}, + %{name: "name", value_prefix: "AAUTHTYPE", page: 0x01, token: 0x33}, + %{name: "name", value_prefix: "ADDR", page: 0x01, token: 0x34}, + %{name: "name", value_prefix: "ADDRTYPE", page: 0x01, token: 0x35}, + %{name: "name", value_prefix: "APPID", page: 0x01, token: 0x36}, + %{name: "name", value_prefix: "APROTOCOL", page: 0x01, token: 0x37}, + %{name: "name", value_prefix: "PROVIDER-ID", page: 0x01, token: 0x38}, + %{name: "name", value_prefix: "TO-PROXY", page: 0x01, token: 0x39}, + %{name: "name", value_prefix: "URI", page: 0x01, token: 0x3A}, + %{name: "name", value_prefix: "RULE", page: 0x01, token: 0x3B} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: "IPV4", page: 0x00, token: 0x85}, + %{value: "IPV6", page: 0x00, token: 0x86}, + %{value: "E164", page: 0x00, token: 0x87}, + %{value: "ALPHA", page: 0x00, token: 0x88}, + %{value: "APN", page: 0x00, token: 0x89}, + %{value: "SCODE", page: 0x00, token: 0x8A}, + %{value: "TETRA-ITSI", page: 0x00, token: 0x8B}, + %{value: "MAN", page: 0x00, token: 0x8C}, + %{value: "IPV6", page: 0x01, token: 0x86}, + %{value: "E164", page: 0x01, token: 0x87}, + %{value: "ALPHA", page: 0x01, token: 0x88}, + %{value: "APPSRV", page: 0x01, token: 0x8D}, + %{value: "OBEX", page: 0x01, token: 0x8E}, + %{value: "ANALOG-MODEM", page: 0x00, token: 0x90}, + %{value: "V.120", page: 0x00, token: 0x91}, + %{value: "V.110", page: 0x00, token: 0x92}, + %{value: "X.31", page: 0x00, token: 0x93}, + %{value: "BIT-TRANSPARENT", page: 0x00, token: 0x94}, + %{value: "DIRECT-ASYNCHRONOUS-DATA-SERVICE", page: 0x00, token: 0x95}, + %{value: "PAP", page: 0x00, token: 0x9A}, + %{value: "CHAP", page: 0x00, token: 0x9B}, + %{value: "HTTP-BASIC", page: 0x00, token: 0x9C}, + %{value: "HTTP-DIGEST", page: 0x00, token: 0x9D}, + %{value: "WTLS-SS", page: 0x00, token: 0x9E}, + %{value: "MD5", page: 0x00, token: 0x9F}, + %{value: "GSM-USSD", page: 0x00, token: 0xA2}, + %{value: "GSM-SMS", page: 0x00, token: 0xA3}, + %{value: "ANSI-136-GUTS", page: 0x00, token: 0xA4}, + %{value: "IS-95-CDMA-SMS", page: 0x00, token: 0xA5}, + %{value: "IS-95-CDMA-CSD", page: 0x00, token: 0xA6}, + %{value: "IS-95-CDMA-PACKET", page: 0x00, token: 0xA7}, + %{value: "ANSI-136-CSD", page: 0x00, token: 0xA8}, + %{value: "ANSI-136-GPRS", page: 0x00, token: 0xA9}, + %{value: "GSM-CSD", page: 0x00, token: 0xAA}, + %{value: "GSM-GPRS", page: 0x00, token: 0xAB}, + %{value: "AMPS-CDPD", page: 0x00, token: 0xAC}, + %{value: "PDC-CSD", page: 0x00, token: 0xAD}, + %{value: "PDC-PACKET", page: 0x00, token: 0xAE}, + %{value: "IDEN-SMS", page: 0x00, token: 0xAF}, + %{value: "IDEN-CSD", page: 0x00, token: 0xB0}, + %{value: "IDEN-PACKET", page: 0x00, token: 0xB1}, + %{value: "FLEX/REFLEX", page: 0x00, token: 0xB2}, + %{value: "PHS-SMS", page: 0x00, token: 0xB3}, + %{value: "PHS-CSD", page: 0x00, token: 0xB4}, + %{value: "TRETRA-SDS", page: 0x00, token: 0xB5}, + %{value: "TRETRA-PACKET", page: 0x00, token: 0xB6}, + %{value: "ANSI-136-GHOST", page: 0x00, token: 0xB7}, + %{value: "MOBITEX-MPAK", page: 0x00, token: 0xB8}, + %{value: "CDMA2000-1X-SIMPLE-IP", page: 0x00, token: 0xB9}, + %{value: "CDMA2000-1X-MOBILE-IP", page: 0x00, token: 0xBA}, + %{value: "AUTOBAUDING", page: 0x00, token: 0xC5}, + %{value: "CL-WSP", page: 0x00, token: 0xCA}, + %{value: "CO-WSP", page: 0x00, token: 0xCB}, + %{value: "CL-SEC-WSP", page: 0x00, token: 0xCC}, + %{value: "CO-SEC-WSP", page: 0x00, token: 0xCD}, + %{value: "CL-SEC-WTA", page: 0x00, token: 0xCE}, + %{value: "CO-SEC-WTA", page: 0x00, token: 0xCF}, + %{value: "OTA-HTTP-TO", page: 0x00, token: 0xD0}, + %{value: "OTA-HTTP-TLS-TO", page: 0x00, token: 0xD1}, + %{value: "OTA-HTTP-PO", page: 0x00, token: 0xD2}, + %{value: "OTA-HTTP-TLS-PO", page: 0x00, token: 0xD3}, + %{value: ",", page: 0x01, token: 0x90}, + %{value: "HTTP-", page: 0x01, token: 0x91}, + %{value: "BASIC", page: 0x01, token: 0x92}, + %{value: "DIGEST", page: 0x01, token: 0x93}, + %{value: "AAA", page: 0x00, token: 0xE0}, + %{value: "HA", page: 0x00, token: 0xE1} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/si10.ex b/lib/libwbxml/tables/generated/si10.ex new file mode 100644 index 0000000..26a41f4 --- /dev/null +++ b/lib/libwbxml/tables/generated/si10.ex @@ -0,0 +1,78 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Si10 do + @moduledoc false + # WBXML token tables for language `:si10` (WBXMLLanguage value 1301). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :si10 + def lang_id, do: 1301 + + @public_id %{ + wbxml_public_id: 0x05, + xml_public_id: "-//WAPFORUM//DTD SI 1.0//EN", + root_element: "si", + dtd: "http://www.wapforum.org/DTD/si.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "si", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "indication", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "info", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "item", page: 0x00, token: 0x08, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "action", value_prefix: "signal-none", page: 0x00, token: 0x05}, + %{name: "action", value_prefix: "signal-low", page: 0x00, token: 0x06}, + %{name: "action", value_prefix: "signal-medium", page: 0x00, token: 0x07}, + %{name: "action", value_prefix: "signal-high", page: 0x00, token: 0x08}, + %{name: "action", value_prefix: "delete", page: 0x00, token: 0x09}, + %{name: "created", value_prefix: nil, page: 0x00, token: 0x0A}, + %{name: "href", value_prefix: nil, page: 0x00, token: 0x0B}, + %{name: "href", value_prefix: "http://www.", page: 0x00, token: 0x0D}, + %{name: "href", value_prefix: "http://", page: 0x00, token: 0x0C}, + %{name: "href", value_prefix: "https://www.", page: 0x00, token: 0x0F}, + %{name: "href", value_prefix: "https://", page: 0x00, token: 0x0E}, + %{name: "si-expires", value_prefix: nil, page: 0x00, token: 0x10}, + %{name: "si-id", value_prefix: nil, page: 0x00, token: 0x11}, + %{name: "class", value_prefix: nil, page: 0x00, token: 0x12} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: ".com/", page: 0x00, token: 0x85}, + %{value: ".edu/", page: 0x00, token: 0x86}, + %{value: ".net/", page: 0x00, token: 0x87}, + %{value: ".org/", page: 0x00, token: 0x88} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/sl10.ex b/lib/libwbxml/tables/generated/sl10.ex new file mode 100644 index 0000000..1266636 --- /dev/null +++ b/lib/libwbxml/tables/generated/sl10.ex @@ -0,0 +1,69 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Sl10 do + @moduledoc false + # WBXML token tables for language `:sl10` (WBXMLLanguage value 1401). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :sl10 + def lang_id, do: 1401 + + @public_id %{ + wbxml_public_id: 0x06, + xml_public_id: "-//WAPFORUM//DTD SL 1.0//EN", + root_element: "sl", + dtd: "http://www.wapforum.org/DTD/sl.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "sl", page: 0x00, token: 0x05, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "action", value_prefix: "execute-low", page: 0x00, token: 0x05}, + %{name: "action", value_prefix: "execute-high", page: 0x00, token: 0x06}, + %{name: "action", value_prefix: "cache", page: 0x00, token: 0x07}, + %{name: "href", value_prefix: nil, page: 0x00, token: 0x08}, + %{name: "href", value_prefix: "http://www.", page: 0x00, token: 0x0A}, + %{name: "href", value_prefix: "http://", page: 0x00, token: 0x09}, + %{name: "href", value_prefix: "https://www.", page: 0x00, token: 0x0C}, + %{name: "href", value_prefix: "https://", page: 0x00, token: 0x0B} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: ".com/", page: 0x00, token: 0x85}, + %{value: ".edu/", page: 0x00, token: 0x86}, + %{value: ".net/", page: 0x00, token: 0x87}, + %{value: ".org/", page: 0x00, token: 0x88} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/syncml10.ex b/lib/libwbxml/tables/generated/syncml10.ex new file mode 100644 index 0000000..16ff083 --- /dev/null +++ b/lib/libwbxml/tables/generated/syncml10.ex @@ -0,0 +1,54 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Syncml10 do + @moduledoc false + # WBXML token tables for language `:syncml10` (WBXMLLanguage value 2001). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :syncml10 + def lang_id, do: 2001 + + @public_id %{ + wbxml_public_id: 0xFD1, + xml_public_id: "-//SYNCML//DTD SyncML 1.0//EN", + root_element: "SyncML", + dtd: "http://www.syncml.org/docs/syncml_represent_v10_20001207.dtd" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.Syncml11 in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.Syncml11 + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.Syncml11 + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.Syncml11 + + @namespaces [ + %{uri: "SYNCML:SYNCML1.0", page: 0x00}, + %{uri: "syncml:metinf", page: 0x01} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/syncml11.ex b/lib/libwbxml/tables/generated/syncml11.ex new file mode 100644 index 0000000..7b15333 --- /dev/null +++ b/lib/libwbxml/tables/generated/syncml11.ex @@ -0,0 +1,123 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Syncml11 do + @moduledoc false + # WBXML token tables for language `:syncml11` (WBXMLLanguage value 2101). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :syncml11 + def lang_id, do: 2101 + + @public_id %{ + wbxml_public_id: 0xFD3, + xml_public_id: "-//SYNCML//DTD SyncML 1.1//EN", + root_element: "SyncML", + dtd: "http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "Add", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "Alert", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "Archive", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "Atomic", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "Chal", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "Cmd", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "CmdID", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "CmdRef", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "Copy", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "Cred", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "Data", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "Delete", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "Exec", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "Final", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "Get", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "Item", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "Lang", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "LocName", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "LocURI", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "Map", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "MapItem", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "Meta", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "MsgID", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "MsgRef", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "NoResp", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "NoResults", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "Put", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "Replace", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "RespURI", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "Results", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "Search", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "Sequence", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "SessionID", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "SftDel", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "Source", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "SourceRef", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "Status", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "Sync", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "SyncBody", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "SyncHdr", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "SyncML", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "Target", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "TargetRef", page: 0x00, token: 0x2F, options: MapSet.new([])}, + %{name: "Reserved for future use", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "VerDTD", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "VerProto", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "NumberOfChanges", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "MoreData", page: 0x00, token: 0x34, options: MapSet.new([])}, + %{name: "SourceParent", page: 0x00, token: 0x39, options: MapSet.new([])}, + %{name: "Anchor", page: 0x01, token: 0x05, options: MapSet.new([])}, + %{name: "EMI", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "Format", page: 0x01, token: 0x07, options: MapSet.new([])}, + %{name: "FreeID", page: 0x01, token: 0x08, options: MapSet.new([])}, + %{name: "FreeMem", page: 0x01, token: 0x09, options: MapSet.new([])}, + %{name: "Last", page: 0x01, token: 0x0A, options: MapSet.new([])}, + %{name: "Mark", page: 0x01, token: 0x0B, options: MapSet.new([])}, + %{name: "MaxMsgSize", page: 0x01, token: 0x0C, options: MapSet.new([])}, + %{name: "Mem", page: 0x01, token: 0x0D, options: MapSet.new([])}, + %{name: "MetInf", page: 0x01, token: 0x0E, options: MapSet.new([])}, + %{name: "Next", page: 0x01, token: 0x0F, options: MapSet.new([])}, + %{name: "NextNonce", page: 0x01, token: 0x10, options: MapSet.new([])}, + %{name: "SharedMem", page: 0x01, token: 0x11, options: MapSet.new([])}, + %{name: "Size", page: 0x01, token: 0x12, options: MapSet.new([])}, + %{name: "Type", page: 0x01, token: 0x13, options: MapSet.new([])}, + %{name: "Version", page: 0x01, token: 0x14, options: MapSet.new([])}, + %{name: "MaxObjSize", page: 0x01, token: 0x15, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [ + %{uri: "SYNCML:SYNCML1.1", page: 0x00}, + %{uri: "syncml:metinf", page: 0x01} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/syncml12.ex b/lib/libwbxml/tables/generated/syncml12.ex new file mode 100644 index 0000000..1788d8c --- /dev/null +++ b/lib/libwbxml/tables/generated/syncml12.ex @@ -0,0 +1,131 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Syncml12 do + @moduledoc false + # WBXML token tables for language `:syncml12` (WBXMLLanguage value 2201). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :syncml12 + def lang_id, do: 2201 + + @public_id %{ + wbxml_public_id: 0x1201, + xml_public_id: "-//SYNCML//DTD SyncML 1.2//EN", + root_element: "SyncML", + dtd: "http://www.openmobilealliance.org/tech/DTD/OMA-TS-SyncML_RepPro_DTD-V1_2.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "Add", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "Alert", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "Archive", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "Atomic", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "Chal", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "Cmd", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "CmdID", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "CmdRef", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "Copy", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "Cred", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "Data", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "Delete", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "Exec", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "Final", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "Get", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "Item", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "Lang", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "LocName", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "LocURI", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "Map", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "MapItem", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "Meta", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "MsgID", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "MsgRef", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "NoResp", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "NoResults", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "Put", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "Replace", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "RespURI", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "Results", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "Search", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "Sequence", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "SessionID", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "SftDel", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "Source", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "SourceRef", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "Status", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "Sync", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "SyncBody", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "SyncHdr", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "SyncML", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "Target", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "TargetRef", page: 0x00, token: 0x2F, options: MapSet.new([])}, + %{name: "Reserved for future use", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "VerDTD", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "VerProto", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "NumberOfChanges", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "MoreData", page: 0x00, token: 0x34, options: MapSet.new([])}, + %{name: "Field", page: 0x00, token: 0x35, options: MapSet.new([])}, + %{name: "Filter", page: 0x00, token: 0x36, options: MapSet.new([])}, + %{name: "Record", page: 0x00, token: 0x37, options: MapSet.new([])}, + %{name: "FilterType", page: 0x00, token: 0x38, options: MapSet.new([])}, + %{name: "SourceParent", page: 0x00, token: 0x39, options: MapSet.new([])}, + %{name: "TargetParent", page: 0x00, token: 0x3A, options: MapSet.new([])}, + %{name: "Move", page: 0x00, token: 0x3B, options: MapSet.new([])}, + %{name: "Correlator", page: 0x00, token: 0x3C, options: MapSet.new([])}, + %{name: "Anchor", page: 0x01, token: 0x05, options: MapSet.new([])}, + %{name: "EMI", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "Format", page: 0x01, token: 0x07, options: MapSet.new([])}, + %{name: "FreeID", page: 0x01, token: 0x08, options: MapSet.new([])}, + %{name: "FreeMem", page: 0x01, token: 0x09, options: MapSet.new([])}, + %{name: "Last", page: 0x01, token: 0x0A, options: MapSet.new([])}, + %{name: "Mark", page: 0x01, token: 0x0B, options: MapSet.new([])}, + %{name: "MaxMsgSize", page: 0x01, token: 0x0C, options: MapSet.new([])}, + %{name: "Mem", page: 0x01, token: 0x0D, options: MapSet.new([])}, + %{name: "MetInf", page: 0x01, token: 0x0E, options: MapSet.new([])}, + %{name: "Next", page: 0x01, token: 0x0F, options: MapSet.new([])}, + %{name: "NextNonce", page: 0x01, token: 0x10, options: MapSet.new([])}, + %{name: "SharedMem", page: 0x01, token: 0x11, options: MapSet.new([])}, + %{name: "Size", page: 0x01, token: 0x12, options: MapSet.new([])}, + %{name: "Type", page: 0x01, token: 0x13, options: MapSet.new([])}, + %{name: "Version", page: 0x01, token: 0x14, options: MapSet.new([])}, + %{name: "MaxObjSize", page: 0x01, token: 0x15, options: MapSet.new([])}, + %{name: "FieldLevel", page: 0x01, token: 0x16, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [ + %{uri: "SYNCML:SYNCML1.2", page: 0x00}, + %{uri: "syncml:metinf", page: 0x01} + ] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wml10.ex b/lib/libwbxml/tables/generated/wml10.ex new file mode 100644 index 0000000..9c53ab5 --- /dev/null +++ b/lib/libwbxml/tables/generated/wml10.ex @@ -0,0 +1,46 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Wml10 do + @moduledoc false + # WBXML token tables for language `:wml10` (WBXMLLanguage value 1101). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wml10 + def lang_id, do: 1101 + + @public_id %{ + wbxml_public_id: 0x02, + xml_public_id: "-//WAPFORUM//DTD WML 1.0//EN", + root_element: "wml", + dtd: "http://www.wapforum.org/DTD/wml.xml" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.Wml13 + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate attrs(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_by_token(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_by_name(), to: Libwbxml.Tables.Generated.Wml13 + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate attr_values(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_value_by_token(), to: Libwbxml.Tables.Generated.Wml13 + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wml11.ex b/lib/libwbxml/tables/generated/wml11.ex new file mode 100644 index 0000000..b16e127 --- /dev/null +++ b/lib/libwbxml/tables/generated/wml11.ex @@ -0,0 +1,46 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Wml11 do + @moduledoc false + # WBXML token tables for language `:wml11` (WBXMLLanguage value 1102). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wml11 + def lang_id, do: 1102 + + @public_id %{ + wbxml_public_id: 0x04, + xml_public_id: "-//WAPFORUM//DTD WML 1.1//EN", + root_element: "wml", + dtd: "http://www.wapforum.org/DTD/wml_1_1.dtd" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.Wml13 + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate attrs(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_by_token(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_by_name(), to: Libwbxml.Tables.Generated.Wml13 + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate attr_values(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_value_by_token(), to: Libwbxml.Tables.Generated.Wml13 + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wml12.ex b/lib/libwbxml/tables/generated/wml12.ex new file mode 100644 index 0000000..b2bd149 --- /dev/null +++ b/lib/libwbxml/tables/generated/wml12.ex @@ -0,0 +1,46 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Wml12 do + @moduledoc false + # WBXML token tables for language `:wml12` (WBXMLLanguage value 1103). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wml12 + def lang_id, do: 1103 + + @public_id %{ + wbxml_public_id: 0x09, + xml_public_id: "-//WAPFORUM//DTD WML 1.2//EN", + root_element: "wml", + dtd: "http://www.wapforum.org/DTD/wml12.dtd" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.Wml13 + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate attrs(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_by_token(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_by_name(), to: Libwbxml.Tables.Generated.Wml13 + + # Shared with Libwbxml.Tables.Generated.Wml13 in C. + defdelegate attr_values(), to: Libwbxml.Tables.Generated.Wml13 + defdelegate attr_value_by_token(), to: Libwbxml.Tables.Generated.Wml13 + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wml13.ex b/lib/libwbxml/tables/generated/wml13.ex new file mode 100644 index 0000000..36eddb6 --- /dev/null +++ b/lib/libwbxml/tables/generated/wml13.ex @@ -0,0 +1,214 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Wml13 do + @moduledoc false + # WBXML token tables for language `:wml13` (WBXMLLanguage value 1104). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wml13 + def lang_id, do: 1104 + + @public_id %{ + wbxml_public_id: 0x0A, + xml_public_id: "-//WAPFORUM//DTD WML 1.3//EN", + root_element: "wml", + dtd: "http://www.wapforum.org/DTD/wml13.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "a", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "anchor", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "access", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "b", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "big", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "br", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "card", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "do", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "em", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "fieldset", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "go", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "head", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "i", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "img", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "input", page: 0x00, token: 0x2F, options: MapSet.new([])}, + %{name: "meta", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "noop", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "p", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "postfield", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "pre", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "prev", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "onevent", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "optgroup", page: 0x00, token: 0x34, options: MapSet.new([])}, + %{name: "option", page: 0x00, token: 0x35, options: MapSet.new([])}, + %{name: "refresh", page: 0x00, token: 0x36, options: MapSet.new([])}, + %{name: "select", page: 0x00, token: 0x37, options: MapSet.new([])}, + %{name: "setvar", page: 0x00, token: 0x3E, options: MapSet.new([])}, + %{name: "small", page: 0x00, token: 0x38, options: MapSet.new([])}, + %{name: "strong", page: 0x00, token: 0x39, options: MapSet.new([])}, + %{name: "table", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "td", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "template", page: 0x00, token: 0x3B, options: MapSet.new([])}, + %{name: "timer", page: 0x00, token: 0x3C, options: MapSet.new([])}, + %{name: "tr", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "u", page: 0x00, token: 0x3D, options: MapSet.new([])}, + %{name: "wml", page: 0x00, token: 0x3F, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "accept-charset", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "accesskey", value_prefix: nil, page: 0x00, token: 0x5E}, + %{name: "align", value_prefix: nil, page: 0x00, token: 0x52}, + %{name: "align", value_prefix: "bottom", page: 0x00, token: 0x06}, + %{name: "align", value_prefix: "center", page: 0x00, token: 0x07}, + %{name: "align", value_prefix: "left", page: 0x00, token: 0x08}, + %{name: "align", value_prefix: "middle", page: 0x00, token: 0x09}, + %{name: "align", value_prefix: "right", page: 0x00, token: 0x0A}, + %{name: "align", value_prefix: "top", page: 0x00, token: 0x0B}, + %{name: "alt", value_prefix: nil, page: 0x00, token: 0x0C}, + %{name: "cache-control", value_prefix: "no-cache", page: 0x00, token: 0x64}, + %{name: "class", value_prefix: nil, page: 0x00, token: 0x54}, + %{name: "columns", value_prefix: nil, page: 0x00, token: 0x53}, + %{name: "content", value_prefix: nil, page: 0x00, token: 0x0D}, + %{ + name: "content", + value_prefix: "application/vnd.wap.wmlc;charset=", + page: 0x00, + token: 0x5C + }, + %{name: "domain", value_prefix: nil, page: 0x00, token: 0x0F}, + %{name: "emptyok", value_prefix: "false", page: 0x00, token: 0x10}, + %{name: "emptyok", value_prefix: "true", page: 0x00, token: 0x11}, + %{name: "enctype", value_prefix: nil, page: 0x00, token: 0x5F}, + %{ + name: "enctype", + value_prefix: "application/x-www-form-urlencoded", + page: 0x00, + token: 0x60 + }, + %{name: "enctype", value_prefix: "multipart/form-data", page: 0x00, token: 0x61}, + %{name: "format", value_prefix: nil, page: 0x00, token: 0x12}, + %{name: "forua", value_prefix: "false", page: 0x00, token: 0x56}, + %{name: "forua", value_prefix: "true", page: 0x00, token: 0x57}, + %{name: "height", value_prefix: nil, page: 0x00, token: 0x13}, + %{name: "href", value_prefix: nil, page: 0x00, token: 0x4A}, + %{name: "href", value_prefix: "http://", page: 0x00, token: 0x4B}, + %{name: "href", value_prefix: "https://", page: 0x00, token: 0x4C}, + %{name: "hspace", value_prefix: nil, page: 0x00, token: 0x14}, + %{name: "http-equiv", value_prefix: nil, page: 0x00, token: 0x5A}, + %{name: "http-equiv", value_prefix: "Content-Type", page: 0x00, token: 0x5B}, + %{name: "http-equiv", value_prefix: "Expires", page: 0x00, token: 0x5D}, + %{name: "id", value_prefix: nil, page: 0x00, token: 0x55}, + %{name: "ivalue", value_prefix: nil, page: 0x00, token: 0x15}, + %{name: "iname", value_prefix: nil, page: 0x00, token: 0x16}, + %{name: "label", value_prefix: nil, page: 0x00, token: 0x18}, + %{name: "localsrc", value_prefix: nil, page: 0x00, token: 0x19}, + %{name: "maxlength", value_prefix: nil, page: 0x00, token: 0x1A}, + %{name: "method", value_prefix: "get", page: 0x00, token: 0x1B}, + %{name: "method", value_prefix: "post", page: 0x00, token: 0x1C}, + %{name: "mode", value_prefix: "nowrap", page: 0x00, token: 0x1D}, + %{name: "mode", value_prefix: "wrap", page: 0x00, token: 0x1E}, + %{name: "multiple", value_prefix: "false", page: 0x00, token: 0x1F}, + %{name: "multiple", value_prefix: "true", page: 0x00, token: 0x20}, + %{name: "name", value_prefix: nil, page: 0x00, token: 0x21}, + %{name: "newcontext", value_prefix: "false", page: 0x00, token: 0x22}, + %{name: "newcontext", value_prefix: "true", page: 0x00, token: 0x23}, + %{name: "onenterbackward", value_prefix: nil, page: 0x00, token: 0x25}, + %{name: "onenterforward", value_prefix: nil, page: 0x00, token: 0x26}, + %{name: "onpick", value_prefix: nil, page: 0x00, token: 0x24}, + %{name: "ontimer", value_prefix: nil, page: 0x00, token: 0x27}, + %{name: "optional", value_prefix: "false", page: 0x00, token: 0x28}, + %{name: "optional", value_prefix: "true", page: 0x00, token: 0x29}, + %{name: "path", value_prefix: nil, page: 0x00, token: 0x2A}, + %{name: "scheme", value_prefix: nil, page: 0x00, token: 0x2E}, + %{name: "sendreferer", value_prefix: "false", page: 0x00, token: 0x2F}, + %{name: "sendreferer", value_prefix: "true", page: 0x00, token: 0x30}, + %{name: "size", value_prefix: nil, page: 0x00, token: 0x31}, + %{name: "src", value_prefix: nil, page: 0x00, token: 0x32}, + %{name: "src", value_prefix: "http://", page: 0x00, token: 0x58}, + %{name: "src", value_prefix: "https://", page: 0x00, token: 0x59}, + %{name: "ordered", value_prefix: "true", page: 0x00, token: 0x33}, + %{name: "ordered", value_prefix: "false", page: 0x00, token: 0x34}, + %{name: "tabindex", value_prefix: nil, page: 0x00, token: 0x35}, + %{name: "title", value_prefix: nil, page: 0x00, token: 0x36}, + %{name: "type", value_prefix: nil, page: 0x00, token: 0x37}, + %{name: "type", value_prefix: "accept", page: 0x00, token: 0x38}, + %{name: "type", value_prefix: "delete", page: 0x00, token: 0x39}, + %{name: "type", value_prefix: "help", page: 0x00, token: 0x3A}, + %{name: "type", value_prefix: "password", page: 0x00, token: 0x3B}, + %{name: "type", value_prefix: "onpick", page: 0x00, token: 0x3C}, + %{name: "type", value_prefix: "onenterbackward", page: 0x00, token: 0x3D}, + %{name: "type", value_prefix: "onenterforward", page: 0x00, token: 0x3E}, + %{name: "type", value_prefix: "ontimer", page: 0x00, token: 0x3F}, + %{name: "type", value_prefix: "options", page: 0x00, token: 0x45}, + %{name: "type", value_prefix: "prev", page: 0x00, token: 0x46}, + %{name: "type", value_prefix: "reset", page: 0x00, token: 0x47}, + %{name: "type", value_prefix: "text", page: 0x00, token: 0x48}, + %{name: "type", value_prefix: "vnd.", page: 0x00, token: 0x49}, + %{name: "value", value_prefix: nil, page: 0x00, token: 0x4D}, + %{name: "vspace", value_prefix: nil, page: 0x00, token: 0x4E}, + %{name: "width", value_prefix: nil, page: 0x00, token: 0x4F}, + %{name: "xml:lang", value_prefix: nil, page: 0x00, token: 0x50}, + %{name: "xml:space", value_prefix: "preserve", page: 0x00, token: 0x62}, + %{name: "xml:space", value_prefix: "default", page: 0x00, token: 0x63} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: ".com/", page: 0x00, token: 0x85}, + %{value: ".edu/", page: 0x00, token: 0x86}, + %{value: ".net/", page: 0x00, token: 0x87}, + %{value: ".org/", page: 0x00, token: 0x88}, + %{value: "accept", page: 0x00, token: 0x89}, + %{value: "bottom", page: 0x00, token: 0x8A}, + %{value: "clear", page: 0x00, token: 0x8B}, + %{value: "delete", page: 0x00, token: 0x8C}, + %{value: "help", page: 0x00, token: 0x8D}, + %{value: "http://www.", page: 0x00, token: 0x8F}, + %{value: "http://", page: 0x00, token: 0x8E}, + %{value: "https://www.", page: 0x00, token: 0x91}, + %{value: "https://", page: 0x00, token: 0x90}, + %{value: "middle", page: 0x00, token: 0x93}, + %{value: "nowrap", page: 0x00, token: 0x94}, + %{value: "onenterbackward", page: 0x00, token: 0x96}, + %{value: "onenterforward", page: 0x00, token: 0x97}, + %{value: "onpick", page: 0x00, token: 0x95}, + %{value: "ontimer", page: 0x00, token: 0x98}, + %{value: "options", page: 0x00, token: 0x99}, + %{value: "password", page: 0x00, token: 0x9A}, + %{value: "reset", page: 0x00, token: 0x9B}, + %{value: "text", page: 0x00, token: 0x9D}, + %{value: "top", page: 0x00, token: 0x9E}, + %{value: "unknown", page: 0x00, token: 0x9F}, + %{value: "wrap", page: 0x00, token: 0xA0}, + %{value: "www.", page: 0x00, token: 0xA1} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wta10.ex b/lib/libwbxml/tables/generated/wta10.ex new file mode 100644 index 0000000..2afb603 --- /dev/null +++ b/lib/libwbxml/tables/generated/wta10.ex @@ -0,0 +1,62 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Wta10 do + @moduledoc false + # WBXML token tables for language `:wta10` (WBXMLLanguage value 1201). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wta10 + def lang_id, do: 1201 + + @public_id %{ + wbxml_public_id: 0x03, + xml_public_id: "-//WAPFORUM//DTD WTA 1.0//EN", + root_element: "wtai", + dtd: "wtai.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "EVENT", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "EVENTTABLE", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "TYPE", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "URL", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "WTAI", page: 0x00, token: 0x09, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "NAME", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "VALUE", value_prefix: nil, page: 0x00, token: 0x06} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wtawml12.ex b/lib/libwbxml/tables/generated/wtawml12.ex new file mode 100644 index 0000000..c81a79a --- /dev/null +++ b/lib/libwbxml/tables/generated/wtawml12.ex @@ -0,0 +1,241 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.Wtawml12 do + @moduledoc false + # WBXML token tables for language `:wtawml12` (WBXMLLanguage value 1202). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wtawml12 + def lang_id, do: 1202 + + @public_id %{ + wbxml_public_id: 0x0C, + xml_public_id: "-//WAPFORUM//DTD WTA-WML 1.2//EN", + root_element: "wta-wml", + dtd: "http://www.wapforum.org/DTD/wta-wml12.dtd" + } + def public_id, do: @public_id + + @tags [ + %{name: "a", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "anchor", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "access", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "b", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "big", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "br", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "card", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "do", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "em", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "fieldset", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "go", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "head", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "i", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "img", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "input", page: 0x00, token: 0x2F, options: MapSet.new([])}, + %{name: "meta", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "noop", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "p", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "postfield", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "pre", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "prev", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "onevent", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "optgroup", page: 0x00, token: 0x34, options: MapSet.new([])}, + %{name: "option", page: 0x00, token: 0x35, options: MapSet.new([])}, + %{name: "refresh", page: 0x00, token: 0x36, options: MapSet.new([])}, + %{name: "select", page: 0x00, token: 0x37, options: MapSet.new([])}, + %{name: "setvar", page: 0x00, token: 0x3E, options: MapSet.new([])}, + %{name: "small", page: 0x00, token: 0x38, options: MapSet.new([])}, + %{name: "strong", page: 0x00, token: 0x39, options: MapSet.new([])}, + %{name: "table", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "td", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "template", page: 0x00, token: 0x3B, options: MapSet.new([])}, + %{name: "timer", page: 0x00, token: 0x3C, options: MapSet.new([])}, + %{name: "tr", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "u", page: 0x00, token: 0x3D, options: MapSet.new([])}, + %{name: "wml", page: 0x00, token: 0x3F, options: MapSet.new([])}, + %{name: "wta-wml", page: 0x01, token: 0x3F, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{name: "accept-charset", value_prefix: nil, page: 0x00, token: 0x05}, + %{name: "accesskey", value_prefix: nil, page: 0x00, token: 0x5E}, + %{name: "align", value_prefix: nil, page: 0x00, token: 0x52}, + %{name: "align", value_prefix: "bottom", page: 0x00, token: 0x06}, + %{name: "align", value_prefix: "center", page: 0x00, token: 0x07}, + %{name: "align", value_prefix: "left", page: 0x00, token: 0x08}, + %{name: "align", value_prefix: "middle", page: 0x00, token: 0x09}, + %{name: "align", value_prefix: "right", page: 0x00, token: 0x0A}, + %{name: "align", value_prefix: "top", page: 0x00, token: 0x0B}, + %{name: "alt", value_prefix: nil, page: 0x00, token: 0x0C}, + %{name: "class", value_prefix: nil, page: 0x00, token: 0x54}, + %{name: "columns", value_prefix: nil, page: 0x00, token: 0x53}, + %{name: "content", value_prefix: nil, page: 0x00, token: 0x0D}, + %{ + name: "content", + value_prefix: "application/vnd.wap.wmlc;charset=", + page: 0x00, + token: 0x5C + }, + %{name: "domain", value_prefix: nil, page: 0x00, token: 0x0F}, + %{name: "emptyok", value_prefix: "false", page: 0x00, token: 0x10}, + %{name: "emptyok", value_prefix: "true", page: 0x00, token: 0x11}, + %{name: "enctype", value_prefix: nil, page: 0x00, token: 0x5F}, + %{ + name: "enctype", + value_prefix: "application/x-www-form-urlencoded", + page: 0x00, + token: 0x60 + }, + %{name: "enctype", value_prefix: "multipart/form-data", page: 0x00, token: 0x61}, + %{name: "format", value_prefix: nil, page: 0x00, token: 0x12}, + %{name: "forua", value_prefix: "false", page: 0x00, token: 0x56}, + %{name: "forua", value_prefix: "true", page: 0x00, token: 0x57}, + %{name: "height", value_prefix: nil, page: 0x00, token: 0x13}, + %{name: "href", value_prefix: nil, page: 0x00, token: 0x4A}, + %{name: "href", value_prefix: "http://", page: 0x00, token: 0x4B}, + %{name: "href", value_prefix: "https://", page: 0x00, token: 0x4C}, + %{name: "hspace", value_prefix: nil, page: 0x00, token: 0x14}, + %{name: "http-equiv", value_prefix: nil, page: 0x00, token: 0x5A}, + %{name: "http-equiv", value_prefix: "Content-Type", page: 0x00, token: 0x5B}, + %{name: "http-equiv", value_prefix: "Expires", page: 0x00, token: 0x5D}, + %{name: "id", value_prefix: nil, page: 0x00, token: 0x55}, + %{name: "ivalue", value_prefix: nil, page: 0x00, token: 0x15}, + %{name: "iname", value_prefix: nil, page: 0x00, token: 0x16}, + %{name: "label", value_prefix: nil, page: 0x00, token: 0x18}, + %{name: "localsrc", value_prefix: nil, page: 0x00, token: 0x19}, + %{name: "maxlength", value_prefix: nil, page: 0x00, token: 0x1A}, + %{name: "method", value_prefix: "get", page: 0x00, token: 0x1B}, + %{name: "method", value_prefix: "post", page: 0x00, token: 0x1C}, + %{name: "mode", value_prefix: "nowrap", page: 0x00, token: 0x1D}, + %{name: "mode", value_prefix: "wrap", page: 0x00, token: 0x1E}, + %{name: "multiple", value_prefix: "false", page: 0x00, token: 0x1F}, + %{name: "multiple", value_prefix: "true", page: 0x00, token: 0x20}, + %{name: "name", value_prefix: nil, page: 0x00, token: 0x21}, + %{name: "newcontext", value_prefix: "false", page: 0x00, token: 0x22}, + %{name: "newcontext", value_prefix: "true", page: 0x00, token: 0x23}, + %{name: "onenterbackward", value_prefix: nil, page: 0x00, token: 0x25}, + %{name: "onenterforward", value_prefix: nil, page: 0x00, token: 0x26}, + %{name: "onpick", value_prefix: nil, page: 0x00, token: 0x24}, + %{name: "ontimer", value_prefix: nil, page: 0x00, token: 0x27}, + %{name: "optional", value_prefix: "false", page: 0x00, token: 0x28}, + %{name: "optional", value_prefix: "true", page: 0x00, token: 0x29}, + %{name: "path", value_prefix: nil, page: 0x00, token: 0x2A}, + %{name: "scheme", value_prefix: nil, page: 0x00, token: 0x2E}, + %{name: "sendreferer", value_prefix: "false", page: 0x00, token: 0x2F}, + %{name: "sendreferer", value_prefix: "true", page: 0x00, token: 0x30}, + %{name: "size", value_prefix: nil, page: 0x00, token: 0x31}, + %{name: "src", value_prefix: nil, page: 0x00, token: 0x32}, + %{name: "src", value_prefix: "http://", page: 0x00, token: 0x58}, + %{name: "src", value_prefix: "https://", page: 0x00, token: 0x59}, + %{name: "ordered", value_prefix: "true", page: 0x00, token: 0x33}, + %{name: "ordered", value_prefix: "false", page: 0x00, token: 0x34}, + %{name: "tabindex", value_prefix: nil, page: 0x00, token: 0x35}, + %{name: "title", value_prefix: nil, page: 0x00, token: 0x36}, + %{name: "type", value_prefix: nil, page: 0x00, token: 0x37}, + %{name: "type", value_prefix: "accept", page: 0x00, token: 0x38}, + %{name: "type", value_prefix: "delete", page: 0x00, token: 0x39}, + %{name: "type", value_prefix: "help", page: 0x00, token: 0x3A}, + %{name: "type", value_prefix: "password", page: 0x00, token: 0x3B}, + %{name: "type", value_prefix: "onpick", page: 0x00, token: 0x3C}, + %{name: "type", value_prefix: "onenterbackward", page: 0x00, token: 0x3D}, + %{name: "type", value_prefix: "onenterforward", page: 0x00, token: 0x3E}, + %{name: "type", value_prefix: "ontimer", page: 0x00, token: 0x3F}, + %{name: "type", value_prefix: "options", page: 0x00, token: 0x45}, + %{name: "type", value_prefix: "prev", page: 0x00, token: 0x46}, + %{name: "type", value_prefix: "reset", page: 0x00, token: 0x47}, + %{name: "type", value_prefix: "text", page: 0x00, token: 0x48}, + %{name: "type", value_prefix: "vnd.", page: 0x00, token: 0x49}, + %{name: "value", value_prefix: nil, page: 0x00, token: 0x4D}, + %{name: "vspace", value_prefix: nil, page: 0x00, token: 0x4E}, + %{name: "width", value_prefix: nil, page: 0x00, token: 0x4F}, + %{name: "xml:lang", value_prefix: nil, page: 0x00, token: 0x50}, + %{name: "href", value_prefix: "wtai://wp/mc;", page: 0x01, token: 0x06}, + %{name: "href", value_prefix: "wtai://wp/sd;", page: 0x01, token: 0x07}, + %{name: "href", value_prefix: "wtai://wp/ap;", page: 0x01, token: 0x08}, + %{name: "href", value_prefix: "wtai://ms/ec;", page: 0x01, token: 0x09}, + %{name: "href", value_prefix: "wtai://", page: 0x01, token: 0x05}, + %{name: "type", value_prefix: "wtaev-cc/ic", page: 0x01, token: 0x12}, + %{name: "type", value_prefix: "wtaev-cc/cl", page: 0x01, token: 0x13}, + %{name: "type", value_prefix: "wtaev-cc/co", page: 0x01, token: 0x14}, + %{name: "type", value_prefix: "wtaev-cc/oc", page: 0x01, token: 0x15}, + %{name: "type", value_prefix: "wtaev-cc/cc", page: 0x01, token: 0x16}, + %{name: "type", value_prefix: "wtaev-cc/dtmf", page: 0x01, token: 0x17}, + %{name: "type", value_prefix: "wtaev-nt/it", page: 0x01, token: 0x21}, + %{name: "type", value_prefix: "wtaev-nt/st", page: 0x01, token: 0x22}, + %{name: "type", value_prefix: "wtaev-nt/", page: 0x01, token: 0x20}, + %{name: "type", value_prefix: "wtaev-pb/", page: 0x01, token: 0x30}, + %{name: "type", value_prefix: "wtaev-lg/", page: 0x01, token: 0x38}, + %{name: "type", value_prefix: "wtaev-ms/ns", page: 0x01, token: 0x51}, + %{name: "type", value_prefix: "wtaev-ms/", page: 0x01, token: 0x50}, + %{name: "type", value_prefix: "wtaev-gsm/ru", page: 0x01, token: 0x59}, + %{name: "type", value_prefix: "wtaev-gsm/ch", page: 0x01, token: 0x5A}, + %{name: "type", value_prefix: "wtaev-gsm/ca", page: 0x01, token: 0x5B}, + %{name: "type", value_prefix: "wtaev-gsm/", page: 0x01, token: 0x58}, + %{name: "type", value_prefix: "wtaev-pdc", page: 0x01, token: 0x60}, + %{name: "type", value_prefix: "wtaev-ansi136/ia", page: 0x01, token: 0x69}, + %{name: "type", value_prefix: "wtaev-ansi136/if", page: 0x01, token: 0x6A}, + %{name: "type", value_prefix: "wtaev-ansi136", page: 0x01, token: 0x68}, + %{name: "type", value_prefix: "wtaev-cdma/", page: 0x01, token: 0x70}, + %{name: "type", value_prefix: "wtaev-cc", page: 0x01, token: 0x11}, + %{name: "type", value_prefix: "wtaev-", page: 0x01, token: 0x10} + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [ + %{value: ".com/", page: 0x00, token: 0x85}, + %{value: ".edu/", page: 0x00, token: 0x86}, + %{value: ".net/", page: 0x00, token: 0x87}, + %{value: ".org/", page: 0x00, token: 0x88}, + %{value: "accept", page: 0x00, token: 0x89}, + %{value: "bottom", page: 0x00, token: 0x8A}, + %{value: "clear", page: 0x00, token: 0x8B}, + %{value: "delete", page: 0x00, token: 0x8C}, + %{value: "help", page: 0x00, token: 0x8D}, + %{value: "http://www.", page: 0x00, token: 0x8F}, + %{value: "http://", page: 0x00, token: 0x8E}, + %{value: "https://www.", page: 0x00, token: 0x91}, + %{value: "https://", page: 0x00, token: 0x90}, + %{value: "middle", page: 0x00, token: 0x93}, + %{value: "nowrap", page: 0x00, token: 0x94}, + %{value: "onenterbackward", page: 0x00, token: 0x96}, + %{value: "onenterforward", page: 0x00, token: 0x97}, + %{value: "onpick", page: 0x00, token: 0x95}, + %{value: "ontimer", page: 0x00, token: 0x98}, + %{value: "options", page: 0x00, token: 0x99}, + %{value: "password", page: 0x00, token: 0x9A}, + %{value: "reset", page: 0x00, token: 0x9B}, + %{value: "text", page: 0x00, token: 0x9D}, + %{value: "top", page: 0x00, token: 0x9E}, + %{value: "unknown", page: 0x00, token: 0x9F}, + %{value: "wrap", page: 0x00, token: 0xA0}, + %{value: "www.", page: 0x00, token: 0xA1} + ] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wv_csp11.ex b/lib/libwbxml/tables/generated/wv_csp11.ex new file mode 100644 index 0000000..e48ce8d --- /dev/null +++ b/lib/libwbxml/tables/generated/wv_csp11.ex @@ -0,0 +1,542 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.WvCsp11 do + @moduledoc false + # WBXML token tables for language `:wv_csp11` (WBXMLLanguage value 2301). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wv_csp11 + def lang_id, do: 2301 + + @public_id %{ + wbxml_public_id: 0x10, + xml_public_id: "-//OMA//DTD WV-CSP 1.1//EN", + root_element: "WV-CSP-Message", + dtd: "http://www.openmobilealliance.org/DTD/WV-CSP.XML" + } + def public_id, do: @public_id + + @tags [ + %{name: "Acceptance", page: 0x00, token: 0x05, options: MapSet.new([])}, + %{name: "AddList", page: 0x00, token: 0x06, options: MapSet.new([])}, + %{name: "AddNickList", page: 0x00, token: 0x07, options: MapSet.new([])}, + %{name: "ClientID", page: 0x00, token: 0x0A, options: MapSet.new([])}, + %{name: "Code", page: 0x00, token: 0x0B, options: MapSet.new([])}, + %{name: "ContactList", page: 0x00, token: 0x0C, options: MapSet.new([])}, + %{name: "ContentData", page: 0x00, token: 0x0D, options: MapSet.new([])}, + %{name: "ContentEncoding", page: 0x00, token: 0x0E, options: MapSet.new([])}, + %{name: "ContentSize", page: 0x00, token: 0x0F, options: MapSet.new([])}, + %{name: "ContentType", page: 0x00, token: 0x10, options: MapSet.new([])}, + %{name: "DateTime", page: 0x00, token: 0x11, options: MapSet.new([])}, + %{name: "Description", page: 0x00, token: 0x12, options: MapSet.new([])}, + %{name: "DetailedResult", page: 0x00, token: 0x13, options: MapSet.new([])}, + %{name: "EntityList", page: 0x00, token: 0x14, options: MapSet.new([])}, + %{name: "Group", page: 0x00, token: 0x15, options: MapSet.new([])}, + %{name: "GroupID", page: 0x00, token: 0x16, options: MapSet.new([])}, + %{name: "GroupList", page: 0x00, token: 0x17, options: MapSet.new([])}, + %{name: "InUse", page: 0x00, token: 0x18, options: MapSet.new([])}, + %{name: "Logo", page: 0x00, token: 0x19, options: MapSet.new([])}, + %{name: "MessageCount", page: 0x00, token: 0x1A, options: MapSet.new([])}, + %{name: "MessageID", page: 0x00, token: 0x1B, options: MapSet.new([])}, + %{name: "MessageURI", page: 0x00, token: 0x1C, options: MapSet.new([])}, + %{name: "MSISDN", page: 0x00, token: 0x1D, options: MapSet.new([])}, + %{name: "Name", page: 0x00, token: 0x1E, options: MapSet.new([])}, + %{name: "NickList", page: 0x00, token: 0x1F, options: MapSet.new([])}, + %{name: "NickName", page: 0x00, token: 0x20, options: MapSet.new([])}, + %{name: "Poll", page: 0x00, token: 0x21, options: MapSet.new([])}, + %{name: "Presence", page: 0x00, token: 0x22, options: MapSet.new([])}, + %{name: "PresenceSubList", page: 0x00, token: 0x23, options: MapSet.new([])}, + %{name: "PresenceValue", page: 0x00, token: 0x24, options: MapSet.new([])}, + %{name: "Property", page: 0x00, token: 0x25, options: MapSet.new([])}, + %{name: "Qualifier", page: 0x00, token: 0x26, options: MapSet.new([])}, + %{name: "Recipient", page: 0x00, token: 0x27, options: MapSet.new([])}, + %{name: "RemoveList", page: 0x00, token: 0x28, options: MapSet.new([])}, + %{name: "RemoveNickList", page: 0x00, token: 0x29, options: MapSet.new([])}, + %{name: "Result", page: 0x00, token: 0x2A, options: MapSet.new([])}, + %{name: "ScreenName", page: 0x00, token: 0x2B, options: MapSet.new([])}, + %{name: "Sender", page: 0x00, token: 0x2C, options: MapSet.new([])}, + %{name: "Session", page: 0x00, token: 0x2D, options: MapSet.new([])}, + %{name: "SessionDescriptor", page: 0x00, token: 0x2E, options: MapSet.new([])}, + %{name: "SessionID", page: 0x00, token: 0x2F, options: MapSet.new([])}, + %{name: "SessionType", page: 0x00, token: 0x30, options: MapSet.new([])}, + %{name: "SName", page: 0x00, token: 0x08, options: MapSet.new([])}, + %{name: "Status", page: 0x00, token: 0x31, options: MapSet.new([])}, + %{name: "Transaction", page: 0x00, token: 0x32, options: MapSet.new([])}, + %{name: "TransactionContent", page: 0x00, token: 0x33, options: MapSet.new([])}, + %{name: "TransactionDescriptor", page: 0x00, token: 0x34, options: MapSet.new([])}, + %{name: "TransactionID", page: 0x00, token: 0x35, options: MapSet.new([])}, + %{name: "TransactionMode", page: 0x00, token: 0x36, options: MapSet.new([])}, + %{name: "URL", page: 0x00, token: 0x37, options: MapSet.new([])}, + %{name: "URLList", page: 0x00, token: 0x38, options: MapSet.new([])}, + %{name: "User", page: 0x00, token: 0x39, options: MapSet.new([])}, + %{name: "UserID", page: 0x00, token: 0x3A, options: MapSet.new([])}, + %{name: "UserList", page: 0x00, token: 0x3B, options: MapSet.new([])}, + %{name: "Validity", page: 0x00, token: 0x3C, options: MapSet.new([])}, + %{name: "Value", page: 0x00, token: 0x3D, options: MapSet.new([])}, + %{name: "WV-CSP-Message", page: 0x00, token: 0x09, options: MapSet.new([])}, + %{name: "AgreedCapabilityList", page: 0x01, token: 0x3A, options: MapSet.new([])}, + %{name: "AllFunctions", page: 0x01, token: 0x05, options: MapSet.new([])}, + %{name: "AllFunctionsRequest", page: 0x01, token: 0x06, options: MapSet.new([])}, + %{name: "CancelInvite-Request", page: 0x01, token: 0x07, options: MapSet.new([])}, + %{name: "CancelInviteUser-Request", page: 0x01, token: 0x08, options: MapSet.new([])}, + %{name: "Capability", page: 0x01, token: 0x09, options: MapSet.new([])}, + %{name: "CapabilityList", page: 0x01, token: 0x0A, options: MapSet.new([])}, + %{name: "CapabilityRequest", page: 0x01, token: 0x0B, options: MapSet.new([])}, + %{name: "ClientCapability-Request", page: 0x01, token: 0x0C, options: MapSet.new([])}, + %{name: "ClientCapability-Response", page: 0x01, token: 0x0D, options: MapSet.new([])}, + %{name: "CompletionFlag", page: 0x01, token: 0x34, options: MapSet.new([])}, + %{name: "DigestBytes", page: 0x01, token: 0x0E, options: MapSet.new([])}, + %{name: "DigestSchema", page: 0x01, token: 0x0F, options: MapSet.new([])}, + %{name: "Disconnect", page: 0x01, token: 0x10, options: MapSet.new([])}, + %{name: "Extended-Request", page: 0x01, token: 0x38, options: MapSet.new([])}, + %{name: "Extended-Response", page: 0x01, token: 0x39, options: MapSet.new([])}, + %{name: "Extended-Data", page: 0x01, token: 0x3B, options: MapSet.new([])}, + %{name: "Functions", page: 0x01, token: 0x11, options: MapSet.new([])}, + %{name: "GetSPInfo-Request", page: 0x01, token: 0x12, options: MapSet.new([])}, + %{name: "GetSPInfo-Response", page: 0x01, token: 0x13, options: MapSet.new([])}, + %{name: "InviteID", page: 0x01, token: 0x14, options: MapSet.new([])}, + %{name: "InviteNote", page: 0x01, token: 0x15, options: MapSet.new([])}, + %{name: "Invite-Request", page: 0x01, token: 0x16, options: MapSet.new([])}, + %{name: "Invite-Response", page: 0x01, token: 0x17, options: MapSet.new([])}, + %{name: "InviteType", page: 0x01, token: 0x18, options: MapSet.new([])}, + %{name: "InviteUser-Request", page: 0x01, token: 0x19, options: MapSet.new([])}, + %{name: "InviteUser-Response", page: 0x01, token: 0x1A, options: MapSet.new([])}, + %{name: "KeepAlive-Request", page: 0x01, token: 0x1B, options: MapSet.new([])}, + %{name: "KeepAlive-Response", page: 0x01, token: 0x29, options: MapSet.new([])}, + %{name: "KeepAliveTime", page: 0x01, token: 0x1C, options: MapSet.new([])}, + %{name: "Login-Request", page: 0x01, token: 0x1D, options: MapSet.new([])}, + %{name: "Login-Response", page: 0x01, token: 0x1E, options: MapSet.new([])}, + %{name: "Logout-Request", page: 0x01, token: 0x1F, options: MapSet.new([])}, + %{name: "Nonce", page: 0x01, token: 0x20, options: MapSet.new([])}, + %{name: "OtherServer", page: 0x01, token: 0x3C, options: MapSet.new([])}, + %{name: "Password", page: 0x01, token: 0x21, options: MapSet.new([])}, + %{name: "Polling-Request", page: 0x01, token: 0x22, options: MapSet.new([])}, + %{name: "PresenceAttributeNSName", page: 0x01, token: 0x3D, options: MapSet.new([])}, + %{name: "ReceiveList", page: 0x01, token: 0x36, options: MapSet.new([])}, + %{name: "ResponseNote", page: 0x01, token: 0x23, options: MapSet.new([])}, + %{name: "SearchElement", page: 0x01, token: 0x24, options: MapSet.new([])}, + %{name: "SearchFindings", page: 0x01, token: 0x25, options: MapSet.new([])}, + %{name: "SearchID", page: 0x01, token: 0x26, options: MapSet.new([])}, + %{name: "SearchIndex", page: 0x01, token: 0x27, options: MapSet.new([])}, + %{name: "SearchLimit", page: 0x01, token: 0x28, options: MapSet.new([])}, + %{name: "SearchPairList", page: 0x01, token: 0x2A, options: MapSet.new([])}, + %{name: "Search-Request", page: 0x01, token: 0x2B, options: MapSet.new([])}, + %{name: "Search-Response", page: 0x01, token: 0x2C, options: MapSet.new([])}, + %{name: "SearchResult", page: 0x01, token: 0x2D, options: MapSet.new([])}, + %{name: "SearchString", page: 0x01, token: 0x33, options: MapSet.new([])}, + %{name: "Service-Request", page: 0x01, token: 0x2E, options: MapSet.new([])}, + %{name: "Service-Response", page: 0x01, token: 0x2F, options: MapSet.new([])}, + %{name: "SessionCookie", page: 0x01, token: 0x30, options: MapSet.new([])}, + %{name: "SessionNSName", page: 0x01, token: 0x3E, options: MapSet.new([])}, + %{name: "StopSearch-Request", page: 0x01, token: 0x31, options: MapSet.new([])}, + %{name: "TimeToLive", page: 0x01, token: 0x32, options: MapSet.new([])}, + %{name: "TransactionNSName", page: 0x01, token: 0x3F, options: MapSet.new([])}, + %{name: "VerifyID-Request", page: 0x01, token: 0x37, options: MapSet.new([])}, + %{name: "ADDGM", page: 0x02, token: 0x05, options: MapSet.new([])}, + %{name: "AttListFunc", page: 0x02, token: 0x06, options: MapSet.new([])}, + %{name: "BLENT", page: 0x02, token: 0x07, options: MapSet.new([])}, + %{name: "CAAUT", page: 0x02, token: 0x08, options: MapSet.new([])}, + %{name: "CAINV", page: 0x02, token: 0x09, options: MapSet.new([])}, + %{name: "CALI", page: 0x02, token: 0x0A, options: MapSet.new([])}, + %{name: "CCLI", page: 0x02, token: 0x0B, options: MapSet.new([])}, + %{name: "ContListFunc", page: 0x02, token: 0x0C, options: MapSet.new([])}, + %{name: "CREAG", page: 0x02, token: 0x0D, options: MapSet.new([])}, + %{name: "DALI", page: 0x02, token: 0x0E, options: MapSet.new([])}, + %{name: "DCLI", page: 0x02, token: 0x0F, options: MapSet.new([])}, + %{name: "DELGR", page: 0x02, token: 0x10, options: MapSet.new([])}, + %{name: "FundamentalFeat", page: 0x02, token: 0x11, options: MapSet.new([])}, + %{name: "FWMSG", page: 0x02, token: 0x12, options: MapSet.new([])}, + %{name: "GALS", page: 0x02, token: 0x13, options: MapSet.new([])}, + %{name: "GCLI", page: 0x02, token: 0x14, options: MapSet.new([])}, + %{name: "GETGM", page: 0x02, token: 0x15, options: MapSet.new([])}, + %{name: "GETGP", page: 0x02, token: 0x16, options: MapSet.new([])}, + %{name: "GETLM", page: 0x02, token: 0x17, options: MapSet.new([])}, + %{name: "GETM", page: 0x02, token: 0x18, options: MapSet.new([])}, + %{name: "GETPR", page: 0x02, token: 0x19, options: MapSet.new([])}, + %{name: "GETSPI", page: 0x02, token: 0x1A, options: MapSet.new([])}, + %{name: "GETWL", page: 0x02, token: 0x1B, options: MapSet.new([])}, + %{name: "GLBLU", page: 0x02, token: 0x1C, options: MapSet.new([])}, + %{name: "GRCHN", page: 0x02, token: 0x1D, options: MapSet.new([])}, + %{name: "GroupAuthFunc", page: 0x02, token: 0x1E, options: MapSet.new([])}, + %{name: "GroupFeat", page: 0x02, token: 0x1F, options: MapSet.new([])}, + %{name: "GroupMgmtFunc", page: 0x02, token: 0x20, options: MapSet.new([])}, + %{name: "GroupUseFunc", page: 0x02, token: 0x21, options: MapSet.new([])}, + %{name: "IMAuthFunc", page: 0x02, token: 0x22, options: MapSet.new([])}, + %{name: "IMFeat", page: 0x02, token: 0x23, options: MapSet.new([])}, + %{name: "IMReceiveFunc", page: 0x02, token: 0x24, options: MapSet.new([])}, + %{name: "IMSendFunc", page: 0x02, token: 0x25, options: MapSet.new([])}, + %{name: "INVIT", page: 0x02, token: 0x26, options: MapSet.new([])}, + %{name: "InviteFunc", page: 0x02, token: 0x27, options: MapSet.new([])}, + %{name: "MBRAC", page: 0x02, token: 0x28, options: MapSet.new([])}, + %{name: "MCLS", page: 0x02, token: 0x29, options: MapSet.new([])}, + %{name: "MF", page: 0x02, token: 0x3D, options: MapSet.new([])}, + %{name: "MG", page: 0x02, token: 0x3E, options: MapSet.new([])}, + %{name: "MM", page: 0x02, token: 0x3F, options: MapSet.new([])}, + %{name: "MDELIV", page: 0x02, token: 0x2A, options: MapSet.new([])}, + %{name: "NEWM", page: 0x02, token: 0x2B, options: MapSet.new([])}, + %{name: "NOTIF", page: 0x02, token: 0x2C, options: MapSet.new([])}, + %{name: "PresenceAuthFunc", page: 0x02, token: 0x2D, options: MapSet.new([])}, + %{name: "PresenceDeliverFunc", page: 0x02, token: 0x2E, options: MapSet.new([])}, + %{name: "PresenceFeat", page: 0x02, token: 0x2F, options: MapSet.new([])}, + %{name: "REACT", page: 0x02, token: 0x30, options: MapSet.new([])}, + %{name: "REJCM", page: 0x02, token: 0x31, options: MapSet.new([])}, + %{name: "REJEC", page: 0x02, token: 0x32, options: MapSet.new([])}, + %{name: "RMVGM", page: 0x02, token: 0x33, options: MapSet.new([])}, + %{name: "SearchFunc", page: 0x02, token: 0x34, options: MapSet.new([])}, + %{name: "ServiceFunc", page: 0x02, token: 0x35, options: MapSet.new([])}, + %{name: "SETD", page: 0x02, token: 0x36, options: MapSet.new([])}, + %{name: "SETGP", page: 0x02, token: 0x37, options: MapSet.new([])}, + %{name: "SRCH", page: 0x02, token: 0x38, options: MapSet.new([])}, + %{name: "STSRC", page: 0x02, token: 0x39, options: MapSet.new([])}, + %{name: "SUBGCN", page: 0x02, token: 0x3A, options: MapSet.new([])}, + %{name: "UPDPR", page: 0x02, token: 0x3B, options: MapSet.new([])}, + %{name: "WVCSPFeat", page: 0x02, token: 0x3C, options: MapSet.new([])}, + %{name: "AcceptedCharset", page: 0x03, token: 0x05, options: MapSet.new([])}, + %{name: "AcceptedContentLength", page: 0x03, token: 0x06, options: MapSet.new([])}, + %{name: "AcceptedContentType", page: 0x03, token: 0x07, options: MapSet.new([])}, + %{name: "AcceptedTransferEncoding", page: 0x03, token: 0x08, options: MapSet.new([])}, + %{name: "AnyContent", page: 0x03, token: 0x09, options: MapSet.new([])}, + %{name: "DefaultLanguage", page: 0x03, token: 0x0A, options: MapSet.new([])}, + %{name: "InitialDeliveryMethod", page: 0x03, token: 0x0B, options: MapSet.new([])}, + %{name: "MultiTrans", page: 0x03, token: 0x0C, options: MapSet.new([])}, + %{name: "ParserSize", page: 0x03, token: 0x0D, options: MapSet.new([])}, + %{name: "ServerPollMin", page: 0x03, token: 0x0E, options: MapSet.new([])}, + %{name: "SupportedBearer", page: 0x03, token: 0x0F, options: MapSet.new([])}, + %{name: "SupportedCIRMethod", page: 0x03, token: 0x10, options: MapSet.new([])}, + %{name: "TCPAddress", page: 0x03, token: 0x11, options: MapSet.new([])}, + %{name: "TCPPort", page: 0x03, token: 0x12, options: MapSet.new([])}, + %{name: "UDPPort", page: 0x03, token: 0x13, options: MapSet.new([])}, + %{name: "Auto-Subscribe", page: 0x04, token: 0x1E, options: MapSet.new([])}, + %{name: "CancelAuth-Request", page: 0x04, token: 0x05, options: MapSet.new([])}, + %{name: "ContactListProperties", page: 0x04, token: 0x06, options: MapSet.new([])}, + %{name: "CreateAttributeList-Request", page: 0x04, token: 0x07, options: MapSet.new([])}, + %{name: "CreateList-Request", page: 0x04, token: 0x08, options: MapSet.new([])}, + %{name: "DefaultAttributeList", page: 0x04, token: 0x09, options: MapSet.new([])}, + %{name: "DefaultContactList", page: 0x04, token: 0x0A, options: MapSet.new([])}, + %{name: "DefaultList", page: 0x04, token: 0x0B, options: MapSet.new([])}, + %{name: "DeleteAttributeList-Request", page: 0x04, token: 0x0C, options: MapSet.new([])}, + %{name: "DeleteList-Request", page: 0x04, token: 0x0D, options: MapSet.new([])}, + %{name: "GetAttributeList-Request", page: 0x04, token: 0x0E, options: MapSet.new([])}, + %{name: "GetAttributeList-Response", page: 0x04, token: 0x0F, options: MapSet.new([])}, + %{name: "GetList-Request", page: 0x04, token: 0x10, options: MapSet.new([])}, + %{name: "GetList-Response", page: 0x04, token: 0x11, options: MapSet.new([])}, + %{name: "GetPresence-Request", page: 0x04, token: 0x12, options: MapSet.new([])}, + %{name: "GetPresence-Response", page: 0x04, token: 0x13, options: MapSet.new([])}, + %{name: "GetReactiveAuthStatus-Request", page: 0x04, token: 0x1F, options: MapSet.new([])}, + %{name: "GetReactiveAuthStatus-Response", page: 0x04, token: 0x20, options: MapSet.new([])}, + %{name: "GetWatcherList-Request", page: 0x04, token: 0x14, options: MapSet.new([])}, + %{name: "GetWatcherList-Response", page: 0x04, token: 0x15, options: MapSet.new([])}, + %{name: "ListManage-Request", page: 0x04, token: 0x16, options: MapSet.new([])}, + %{name: "ListManage-Response", page: 0x04, token: 0x17, options: MapSet.new([])}, + %{name: "PresenceAuth-Request", page: 0x04, token: 0x19, options: MapSet.new([])}, + %{name: "PresenceAuth-User", page: 0x04, token: 0x1A, options: MapSet.new([])}, + %{name: "PresenceNotification-Request", page: 0x04, token: 0x1B, options: MapSet.new([])}, + %{name: "SubscribePresence-Request", page: 0x04, token: 0x1D, options: MapSet.new([])}, + %{name: "UnsubscribePresence-Request", page: 0x04, token: 0x18, options: MapSet.new([])}, + %{name: "UpdatePresence-Request", page: 0x04, token: 0x1C, options: MapSet.new([])}, + %{name: "Accuracy", page: 0x05, token: 0x05, options: MapSet.new([])}, + %{name: "Address", page: 0x05, token: 0x06, options: MapSet.new([])}, + %{name: "AddrPref", page: 0x05, token: 0x07, options: MapSet.new([])}, + %{name: "Alias", page: 0x05, token: 0x08, options: MapSet.new([])}, + %{name: "Altitude", page: 0x05, token: 0x09, options: MapSet.new([])}, + %{name: "Building", page: 0x05, token: 0x0A, options: MapSet.new([])}, + %{name: "Caddr", page: 0x05, token: 0x0B, options: MapSet.new([])}, + %{name: "Cap", page: 0x05, token: 0x2F, options: MapSet.new([])}, + %{name: "City", page: 0x05, token: 0x0C, options: MapSet.new([])}, + %{name: "ClientInfo", page: 0x05, token: 0x0D, options: MapSet.new([])}, + %{name: "ClientProducer", page: 0x05, token: 0x0E, options: MapSet.new([])}, + %{name: "ClientType", page: 0x05, token: 0x0F, options: MapSet.new([])}, + %{name: "ClientVersion", page: 0x05, token: 0x10, options: MapSet.new([])}, + %{name: "Cname", page: 0x05, token: 0x30, options: MapSet.new([])}, + %{name: "CommC", page: 0x05, token: 0x11, options: MapSet.new([])}, + %{name: "CommCap", page: 0x05, token: 0x12, options: MapSet.new([])}, + %{name: "Contact", page: 0x05, token: 0x31, options: MapSet.new([])}, + %{name: "ContactInfo", page: 0x05, token: 0x13, options: MapSet.new([])}, + %{name: "ContainedvCard", page: 0x05, token: 0x14, options: MapSet.new([])}, + %{name: "Country", page: 0x05, token: 0x15, options: MapSet.new([])}, + %{name: "Cpriority", page: 0x05, token: 0x32, options: MapSet.new([])}, + %{name: "Crossing1", page: 0x05, token: 0x16, options: MapSet.new([])}, + %{name: "Crossing2", page: 0x05, token: 0x17, options: MapSet.new([])}, + %{name: "Cstatus", page: 0x05, token: 0x33, options: MapSet.new([])}, + %{name: "DevManufacturer", page: 0x05, token: 0x18, options: MapSet.new([])}, + %{name: "DirectContent", page: 0x05, token: 0x19, options: MapSet.new([])}, + %{name: "FreeTextLocation", page: 0x05, token: 0x1A, options: MapSet.new([])}, + %{name: "GeoLocation", page: 0x05, token: 0x1B, options: MapSet.new([])}, + %{name: "Inf_link", page: 0x05, token: 0x37, options: MapSet.new([])}, + %{name: "InfoLink", page: 0x05, token: 0x38, options: MapSet.new([])}, + %{name: "Language", page: 0x05, token: 0x1C, options: MapSet.new([])}, + %{name: "Latitude", page: 0x05, token: 0x1D, options: MapSet.new([])}, + %{name: "Link", page: 0x05, token: 0x39, options: MapSet.new([])}, + %{name: "Longitude", page: 0x05, token: 0x1E, options: MapSet.new([])}, + %{name: "Model", page: 0x05, token: 0x1F, options: MapSet.new([])}, + %{name: "NamedArea", page: 0x05, token: 0x20, options: MapSet.new([])}, + %{name: "Note", page: 0x05, token: 0x34, options: MapSet.new([])}, + %{name: "OnlineStatus", page: 0x05, token: 0x21, options: MapSet.new([])}, + %{name: "PLMN", page: 0x05, token: 0x22, options: MapSet.new([])}, + %{name: "PrefC", page: 0x05, token: 0x23, options: MapSet.new([])}, + %{name: "PreferredContacts", page: 0x05, token: 0x24, options: MapSet.new([])}, + %{name: "PreferredLanguage", page: 0x05, token: 0x25, options: MapSet.new([])}, + %{name: "PreferredContent", page: 0x05, token: 0x26, options: MapSet.new([])}, + %{name: "PreferredvCard", page: 0x05, token: 0x27, options: MapSet.new([])}, + %{name: "Registration", page: 0x05, token: 0x28, options: MapSet.new([])}, + %{name: "StatusContent", page: 0x05, token: 0x29, options: MapSet.new([])}, + %{name: "StatusMood", page: 0x05, token: 0x2A, options: MapSet.new([])}, + %{name: "StatusText", page: 0x05, token: 0x2B, options: MapSet.new([])}, + %{name: "Street", page: 0x05, token: 0x2C, options: MapSet.new([])}, + %{name: "Text", page: 0x05, token: 0x3A, options: MapSet.new([])}, + %{name: "TimeZone", page: 0x05, token: 0x2D, options: MapSet.new([])}, + %{name: "UserAvailability", page: 0x05, token: 0x2E, options: MapSet.new([])}, + %{name: "Zone", page: 0x05, token: 0x35, options: MapSet.new([])}, + %{name: "BlockList", page: 0x06, token: 0x05, options: MapSet.new([])}, + %{name: "BlockEntity-Request", page: 0x06, token: 0x06, options: MapSet.new([])}, + %{name: "DeliveryMethod", page: 0x06, token: 0x07, options: MapSet.new([])}, + %{name: "DeliveryReport", page: 0x06, token: 0x08, options: MapSet.new([])}, + %{name: "DeliveryReport-Request", page: 0x06, token: 0x09, options: MapSet.new([])}, + %{name: "DeliveryTime", page: 0x06, token: 0x1A, options: MapSet.new([])}, + %{name: "ForwardMessage-Request", page: 0x06, token: 0x0A, options: MapSet.new([])}, + %{name: "GetBlockedList-Request", page: 0x06, token: 0x0B, options: MapSet.new([])}, + %{name: "GetBlockedList-Response", page: 0x06, token: 0x0C, options: MapSet.new([])}, + %{name: "GetMessageList-Request", page: 0x06, token: 0x0D, options: MapSet.new([])}, + %{name: "GetMessageList-Response", page: 0x06, token: 0x0E, options: MapSet.new([])}, + %{name: "GetMessage-Request", page: 0x06, token: 0x0F, options: MapSet.new([])}, + %{name: "GetMessage-Response", page: 0x06, token: 0x10, options: MapSet.new([])}, + %{name: "GrantList", page: 0x06, token: 0x11, options: MapSet.new([])}, + %{name: "MessageDelivered", page: 0x06, token: 0x12, options: MapSet.new([])}, + %{name: "MessageInfo", page: 0x06, token: 0x13, options: MapSet.new([])}, + %{name: "MessageNotification", page: 0x06, token: 0x14, options: MapSet.new([])}, + %{name: "NewMessage", page: 0x06, token: 0x15, options: MapSet.new([])}, + %{name: "RejectMessage-Request", page: 0x06, token: 0x16, options: MapSet.new([])}, + %{name: "SendMessage-Request", page: 0x06, token: 0x17, options: MapSet.new([])}, + %{name: "SendMessage-Response", page: 0x06, token: 0x18, options: MapSet.new([])}, + %{name: "SetDeliveryMethod-Request", page: 0x06, token: 0x19, options: MapSet.new([])}, + %{name: "AddGroupMembers-Request", page: 0x07, token: 0x05, options: MapSet.new([])}, + %{name: "Admin", page: 0x07, token: 0x06, options: MapSet.new([])}, + %{name: "AdminMapList", page: 0x07, token: 0x26, options: MapSet.new([])}, + %{name: "AdminMapping", page: 0x07, token: 0x27, options: MapSet.new([])}, + %{name: "CreateGroup-Request", page: 0x07, token: 0x07, options: MapSet.new([])}, + %{name: "DeleteGroup-Request", page: 0x07, token: 0x08, options: MapSet.new([])}, + %{name: "GetGroupMembers-Request", page: 0x07, token: 0x09, options: MapSet.new([])}, + %{name: "GetGroupMembers-Response", page: 0x07, token: 0x0A, options: MapSet.new([])}, + %{name: "GetGroupProps-Request", page: 0x07, token: 0x0B, options: MapSet.new([])}, + %{name: "GetGroupProps-Response", page: 0x07, token: 0x0C, options: MapSet.new([])}, + %{name: "GetJoinedUsers-Request", page: 0x07, token: 0x24, options: MapSet.new([])}, + %{name: "GetJoinedUsers-Response", page: 0x07, token: 0x25, options: MapSet.new([])}, + %{name: "GroupChangeNotice", page: 0x07, token: 0x0D, options: MapSet.new([])}, + %{name: "GroupProperties", page: 0x07, token: 0x0E, options: MapSet.new([])}, + %{name: "Joined", page: 0x07, token: 0x0F, options: MapSet.new([])}, + %{name: "JoinGroup", page: 0x07, token: 0x21, options: MapSet.new([])}, + %{name: "JoinedRequest", page: 0x07, token: 0x10, options: MapSet.new([])}, + %{name: "JoinGroup-Request", page: 0x07, token: 0x11, options: MapSet.new([])}, + %{name: "JoinGroup-Response", page: 0x07, token: 0x12, options: MapSet.new([])}, + %{name: "LeaveGroup-Request", page: 0x07, token: 0x13, options: MapSet.new([])}, + %{name: "LeaveGroup-Response", page: 0x07, token: 0x14, options: MapSet.new([])}, + %{name: "Left", page: 0x07, token: 0x15, options: MapSet.new([])}, + %{name: "Mapping", page: 0x07, token: 0x28, options: MapSet.new([])}, + %{name: "MemberAccess-Request", page: 0x07, token: 0x16, options: MapSet.new([])}, + %{name: "Mod", page: 0x07, token: 0x17, options: MapSet.new([])}, + %{name: "ModMapping", page: 0x07, token: 0x29, options: MapSet.new([])}, + %{name: "OwnProperties", page: 0x07, token: 0x18, options: MapSet.new([])}, + %{name: "RejectList-Request", page: 0x07, token: 0x19, options: MapSet.new([])}, + %{name: "RejectList-Response", page: 0x07, token: 0x1A, options: MapSet.new([])}, + %{name: "RemoveGroupMembers-Request", page: 0x07, token: 0x1B, options: MapSet.new([])}, + %{name: "SetGroupProps-Request", page: 0x07, token: 0x1C, options: MapSet.new([])}, + %{name: "SubscribeGroupNotice-Request", page: 0x07, token: 0x1D, options: MapSet.new([])}, + %{name: "SubscribeGroupNotice-Response", page: 0x07, token: 0x1E, options: MapSet.new([])}, + %{name: "SubscribeNotification", page: 0x07, token: 0x22, options: MapSet.new([])}, + %{name: "SubscribeType", page: 0x07, token: 0x23, options: MapSet.new([])}, + %{name: "UserMapList", page: 0x07, token: 0x2A, options: MapSet.new([])}, + %{name: "UserMapping", page: 0x07, token: 0x2B, options: MapSet.new([])}, + %{name: "Users", page: 0x07, token: 0x1F, options: MapSet.new([])}, + %{name: "WelcomeNote", page: 0x07, token: 0x20, options: MapSet.new([])}, + %{name: "GETAUT", page: 0x08, token: 0x06, options: MapSet.new([])}, + %{name: "GETJU", page: 0x08, token: 0x07, options: MapSet.new([])}, + %{name: "MP", page: 0x08, token: 0x05, options: MapSet.new([])}, + %{name: "VRID", page: 0x08, token: 0x08, options: MapSet.new([])}, + %{name: "VerifyIDFunc", page: 0x08, token: 0x09, options: MapSet.new([])}, + %{name: "CIR", page: 0x09, token: 0x05, options: MapSet.new([])}, + %{name: "Domain", page: 0x09, token: 0x06, options: MapSet.new([])}, + %{name: "ExtBlock", page: 0x09, token: 0x07, options: MapSet.new([])}, + %{name: "HistoryPeriod", page: 0x09, token: 0x08, options: MapSet.new([])}, + %{name: "IDList", page: 0x09, token: 0x09, options: MapSet.new([])}, + %{name: "MaxWatcherList", page: 0x09, token: 0x0A, options: MapSet.new([])}, + %{name: "ReactiveAuthState", page: 0x09, token: 0x0B, options: MapSet.new([])}, + %{name: "ReactiveAuthStatus", page: 0x09, token: 0x0C, options: MapSet.new([])}, + %{name: "ReactiveAuthStatusList", page: 0x09, token: 0x0D, options: MapSet.new([])}, + %{name: "Watcher", page: 0x09, token: 0x0E, options: MapSet.new([])}, + %{name: "WatcherStatus", page: 0x09, token: 0x0F, options: MapSet.new([])}, + %{name: "WV-CSP-VersionDiscovery-Request", page: 0x0A, token: 0x05, options: MapSet.new([])}, + %{name: "WV-CSP-VersionDiscovery-Response", page: 0x0A, token: 0x06, options: MapSet.new([])}, + %{name: "VersionList", page: 0x0A, token: 0x07, options: MapSet.new([])} + ] + @tag_by_token Enum.reduce(@tags, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @tag_by_name Enum.group_by(@tags, & &1.name) + def tags, do: @tags + def tag_by_token, do: @tag_by_token + def tag_by_name, do: @tag_by_name + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + @attrs [ + %{ + name: "xmlns", + value_prefix: "http://www.wireless-village.org/CSP", + page: 0x00, + token: 0x05 + }, + %{name: "xmlns", value_prefix: "http://www.wireless-village.org/PA", page: 0x00, token: 0x06}, + %{ + name: "xmlns", + value_prefix: "http://www.wireless-village.org/TRC", + page: 0x00, + token: 0x07 + }, + %{ + name: "xmlns", + value_prefix: "http://www.openmobilealliance.org/DTD/WV-CSP", + page: 0x00, + token: 0x08 + }, + %{ + name: "xmlns", + value_prefix: "http://www.openmobilealliance.org/DTD/WV-PA", + page: 0x00, + token: 0x09 + }, + %{ + name: "xmlns", + value_prefix: "http://www.openmobilealliance.org/DTD/WV-TRC", + page: 0x00, + token: 0x0A + } + ] + @attr_by_token Enum.reduce(@attrs, %{}, fn e, acc -> Map.put_new(acc, {e.page, e.token}, e) end) + @attr_by_name Enum.group_by(@attrs, & &1.name) + def attrs, do: @attrs + def attr_by_token, do: @attr_by_token + def attr_by_name, do: @attr_by_name + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + @ext_values [ + %{value: "application/vnd.wap.mms-message", token: 0x04}, + %{value: "www.wireless-village.org", token: 0x30}, + %{value: "GROUP_USER_ID_AUTOJOIN", token: 0x50}, + %{value: "GROUP_USER_ID_JOINED", token: 0x40}, + %{value: "GROUP_USER_ID_OWNER", token: 0x41}, + %{value: "USER_EMAIL_ADDRESS", token: 0x47}, + %{value: "USER_MOBILE_NUMBER", token: 0x4B}, + %{value: "USER_ONLINE_STATUS", token: 0x4C}, + %{value: "application/x-sms", token: 0x05}, + %{value: "PrivateMessaging", token: 0x1C}, + %{value: "text/x-vCalendar", token: 0x29}, + %{value: "USER_FIRST_NAME", token: 0x48}, + %{value: "MaxActiveUsers", token: 0x13}, + %{value: "PrivilegeLevel", token: 0x1D}, + %{value: "USER_LAST_NAME", token: 0x4A}, + %{value: "NOT_AVAILABLE", token: 0x70}, + %{value: "application/", token: 0x03}, + %{value: "text/x-vCard", token: 0x2A}, + %{value: "MOBILE_PHONE", token: 0x6F}, + %{value: "VIDEO_STREAM", token: 0x77}, + %{value: "ActiveUsers", token: 0x01}, + %{value: "DisplayName", token: 0x0A}, + %{value: "GROUP_TOPIC", token: 0x3F}, + %{value: "AccessType", token: 0x00}, + %{value: "AutoDelete", token: 0x31}, + %{value: "Restricted", token: 0x22}, + %{value: "ScreenName", token: 0x23}, + %{value: "Searchable", token: 0x24}, + %{value: "text/plain", token: 0x28}, + %{value: "GROUP_NAME", token: 0x3E}, + %{value: "USER_ALIAS", token: 0x46}, + %{value: "AUDIO_CALL", token: 0x5E}, + %{value: "IM_OFFLINE", token: 0x69}, + %{value: "INVINCIBLE", token: 0x6C}, + %{value: "VIDEO_CALL", token: 0x76}, + %{value: "AVAILABLE", token: 0x5F}, + %{value: "IM_ONLINE", token: 0x6A}, + %{value: "https://", token: 0x0F}, + %{value: "AutoJoin", token: 0x06}, + %{value: "Response", token: 0x21}, + %{value: "Validity", token: 0x33}, + %{value: "GROUP_ID", token: 0x3D}, + %{value: "COMPUTER", token: 0x63}, + %{value: "DISCREET", token: 0x64}, + %{value: "Default", token: 0x09}, + %{value: "GRANTED", token: 0x35}, + %{value: "http://", token: 0x0E}, + %{value: "Outband", token: 0x19}, + %{value: "PENDING", token: 0x36}, + %{value: "Private", token: 0x1B}, + %{value: "Request", token: 0x20}, + %{value: "USER_ID", token: 0x49}, + %{value: "ANXIOUS", token: 0x5C}, + %{value: "ASHAMED", token: 0x5D}, + %{value: "EXCITED", token: 0x66}, + %{value: "IN_LOVE", token: 0x6B}, + %{value: "JEALOUS", token: 0x6D}, + %{value: "BASE64", token: 0x07}, + %{value: "Closed", token: 0x08}, + %{value: "image/", token: 0x10}, + %{value: "Inband", token: 0x11}, + %{value: "Public", token: 0x1E}, + %{value: "DENIED", token: 0x34}, + %{value: "WAPSMS", token: 0x4D}, + %{value: "WAPUDP", token: 0x4E}, + %{value: "SLEEPY", token: 0x74}, + %{value: "ShowID", token: 0x37}, + %{value: "Admin", token: 0x02}, + %{value: "text/", token: 0x27}, + %{value: "Topic", token: 0x2B}, + %{value: "ANGRY", token: 0x5B}, + %{value: "BORED", token: 0x60}, + %{value: "EMAIL", token: 0x65}, + %{value: "HAPPY", token: 0x67}, + %{value: "OTHER", token: 0x71}, + %{value: "Name", token: 0x15}, + %{value: "None", token: 0x16}, + %{value: "Open", token: 0x18}, + %{value: "Type", token: 0x2D}, + %{value: "HTTP", token: 0x42}, + %{value: "STCP", token: 0x44}, + %{value: "SUDP", token: 0x45}, + %{value: "CALL", token: 0x61}, + %{value: "Mod", token: 0x14}, + %{value: "SMS", token: 0x43}, + %{value: "WSP", token: 0x4F}, + %{value: "CLI", token: 0x62}, + %{value: "MMS", token: 0x6E}, + %{value: "PDA", token: 0x72}, + %{value: "SAD", token: 0x73}, + %{value: "SMS", token: 0x75}, + %{value: "GM", token: 0x32}, + %{value: "GR", token: 0x0D}, + %{value: "IM", token: 0x12}, + %{value: "PR", token: 0x1A}, + %{value: "SC", token: 0x26}, + %{value: "US", token: 0x2F}, + %{value: "IM", token: 0x68}, + %{value: "F", token: 0x0B}, + %{value: "G", token: 0x0C}, + %{value: "N", token: 0x17}, + %{value: "P", token: 0x1F}, + %{value: "S", token: 0x25}, + %{value: "T", token: 0x2C}, + %{value: "U", token: 0x2E} + ] + @ext_value_by_token Enum.reduce(@ext_values, %{}, fn e, acc -> Map.put_new(acc, e.token, e) end) + def ext_values, do: @ext_values + def ext_value_by_token, do: @ext_value_by_token +end diff --git a/lib/libwbxml/tables/generated/wv_csp12.ex b/lib/libwbxml/tables/generated/wv_csp12.ex new file mode 100644 index 0000000..9faac54 --- /dev/null +++ b/lib/libwbxml/tables/generated/wv_csp12.ex @@ -0,0 +1,48 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +defmodule Libwbxml.Tables.Generated.WvCsp12 do + @moduledoc false + # WBXML token tables for language `:wv_csp12` (WBXMLLanguage value 2302). + # Lists are in C table order; *_by_token maps keep the first entry per key, + # matching the linear scans in wbxml_parser.c. + + def lang, do: :wv_csp12 + def lang_id, do: 2302 + + @public_id %{ + wbxml_public_id: nil, + xml_public_id: "-//OMA//DTD WV-CSP 1.2//EN", + root_element: "WV-CSP-Message", + dtd: "http://www.openmobilealliance.org/DTD/WV-CSP.DTD" + } + def public_id, do: @public_id + + # Shared with Libwbxml.Tables.Generated.WvCsp11 in C. + defdelegate tags(), to: Libwbxml.Tables.Generated.WvCsp11 + defdelegate tag_by_token(), to: Libwbxml.Tables.Generated.WvCsp11 + defdelegate tag_by_name(), to: Libwbxml.Tables.Generated.WvCsp11 + + @namespaces [] + @namespace_by_page Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.page, e) end) + @page_by_namespace Enum.reduce(@namespaces, %{}, fn e, acc -> Map.put_new(acc, e.uri, e) end) + def namespaces, do: @namespaces + def namespace_by_page, do: @namespace_by_page + def page_by_namespace, do: @page_by_namespace + + # Shared with Libwbxml.Tables.Generated.WvCsp11 in C. + defdelegate attrs(), to: Libwbxml.Tables.Generated.WvCsp11 + defdelegate attr_by_token(), to: Libwbxml.Tables.Generated.WvCsp11 + defdelegate attr_by_name(), to: Libwbxml.Tables.Generated.WvCsp11 + + @attr_values [] + @attr_value_by_token Enum.reduce(@attr_values, %{}, fn e, acc -> + Map.put_new(acc, {e.page, e.token}, e) + end) + def attr_values, do: @attr_values + def attr_value_by_token, do: @attr_value_by_token + + # Shared with Libwbxml.Tables.Generated.WvCsp11 in C. + defdelegate ext_values(), to: Libwbxml.Tables.Generated.WvCsp11 + defdelegate ext_value_by_token(), to: Libwbxml.Tables.Generated.WvCsp11 +end diff --git a/lib/libwbxml/tables/language.ex b/lib/libwbxml/tables/language.ex new file mode 100644 index 0000000..aa4c5be --- /dev/null +++ b/lib/libwbxml/tables/language.ex @@ -0,0 +1,105 @@ +defmodule Libwbxml.Tables.Language do + @moduledoc """ + A resolved WBXML language table: the Elixir counterpart of C's + `WBXMLLangEntry`. + + Built by `Libwbxml.Tables.get/1` from the generated modules under + `Libwbxml.Tables.Generated`. Every field references data that lives in the + generated module's literal pool, so building and passing this struct around + is cheap. + + Lists are in the original C table order, which matters for prefix-matching + lookups. The `*_by_token` maps keep the **first** entry in table order for a + given key, mirroring the linear scans in `wbxml_parser.c`. + """ + + @typedoc "One `WBXMLTagEntry`. `options` is a subset of `:binary | :opaque | :cdata`." + @type tag :: %{name: String.t(), page: byte(), token: byte(), options: MapSet.t(atom())} + + @typedoc "One `WBXMLNameSpaceEntry`: the XML namespace URI bound to a code page." + @type namespace :: %{uri: String.t(), page: byte()} + + @typedoc "One `WBXMLAttrEntry`. `value_prefix` is `nil` for the plain-name token." + @type attr :: %{name: String.t(), value_prefix: String.t() | nil, page: byte(), token: byte()} + + @typedoc "One `WBXMLAttrValueEntry`." + @type attr_value :: %{value: String.t(), page: byte(), token: byte()} + + @typedoc "One `WBXMLExtValueEntry` (Wireless Village extension tokens)." + @type ext_value :: %{value: String.t(), token: byte()} + + @typedoc """ + The language's `WBXMLPublicIDEntry`. `wbxml_public_id` is `nil` where C uses + `WBXML_PUBLIC_ID_UNKNOWN` (0x01), i.e. the language has no registered WBXML + public ID (ActiveSync, AirSync, OTA, Channel 1.2, MetInf, DDF, WV-CSP 1.2). + `xml_public_id` is `nil` only for OTA Settings, which has no XML public ID. + """ + @type public_id :: %{ + wbxml_public_id: pos_integer() | nil, + xml_public_id: String.t() | nil, + root_element: String.t(), + dtd: String.t() + } + + @type t :: %__MODULE__{ + lang: atom(), + lang_id: pos_integer(), + public_id: public_id(), + tags: [tag()], + namespaces: [namespace()], + attrs: [attr()], + attr_values: [attr_value()], + ext_values: [ext_value()], + tag_by_token: %{{byte(), byte()} => tag()}, + tag_by_name: %{String.t() => [tag()]}, + attr_by_token: %{{byte(), byte()} => attr()}, + attr_by_name: %{String.t() => [attr()]}, + attr_value_by_token: %{{byte(), byte()} => attr_value()}, + ext_value_by_token: %{byte() => ext_value()}, + namespace_by_page: %{byte() => namespace()}, + page_by_namespace: %{String.t() => namespace()} + } + + @enforce_keys [ + :lang, + :lang_id, + :public_id, + :tags, + :namespaces, + :attrs, + :attr_values, + :ext_values, + :tag_by_token, + :tag_by_name, + :attr_by_token, + :attr_by_name, + :attr_value_by_token, + :ext_value_by_token, + :namespace_by_page, + :page_by_namespace + ] + defstruct @enforce_keys + + @doc false + @spec from_module(module()) :: t() + def from_module(mod) do + %__MODULE__{ + lang: mod.lang(), + lang_id: mod.lang_id(), + public_id: mod.public_id(), + tags: mod.tags(), + namespaces: mod.namespaces(), + attrs: mod.attrs(), + attr_values: mod.attr_values(), + ext_values: mod.ext_values(), + tag_by_token: mod.tag_by_token(), + tag_by_name: mod.tag_by_name(), + attr_by_token: mod.attr_by_token(), + attr_by_name: mod.attr_by_name(), + attr_value_by_token: mod.attr_value_by_token(), + ext_value_by_token: mod.ext_value_by_token(), + namespace_by_page: mod.namespace_by_page(), + page_by_namespace: mod.page_by_namespace() + } + end +end diff --git a/lib/libwbxml/tree.ex b/lib/libwbxml/tree.ex new file mode 100644 index 0000000..156c52e --- /dev/null +++ b/lib/libwbxml/tree.ex @@ -0,0 +1,226 @@ +defmodule Libwbxml.Tree do + @moduledoc """ + The document tree shared by the WBXML parser, the XML reader, the WBXML + encoder and the XML writer. + + Port of the data model in upstream `wbxml_tree.h` / `wbxml_elt.h` + (libwbxml 0.11.10), plus the few tree helpers from `wbxml_tree.c` that the + codecs use. Nodes are plain structs; there are no parent pointers, so + helpers that need context take the list of ancestors explicitly. + + ## Nodes + + | Struct | Upstream | Fields | + |---------------------------|--------------------------------|--------| + | `Libwbxml.Tree` | `WBXMLTree` | `lang` (language atom), `orig_charset` (MIBenum), `root` (`Element`) | + | `Libwbxml.Tree.Element` | `WBXML_TREE_ELEMENT_NODE` | `name`, `attrs` (`[Attribute]`), `children` | + | `Libwbxml.Tree.Attribute` | `WBXMLAttribute` | `name`, `value` (string) | + | `Libwbxml.Tree.Text` | `WBXML_TREE_TEXT_NODE` | `data` (string) | + | `Libwbxml.Tree.CData` | `WBXML_TREE_CDATA_NODE` | `children` (text nodes) | + | `Libwbxml.Tree.PI` | `WBXML_TREE_PI_NODE` | `target`, `data` | + | `Libwbxml.Tree.SubTree` | `WBXML_TREE_TREE_NODE` | `tree` (an embedded `Libwbxml.Tree`, e.g. SyncML DevInf) | + + Element and attribute names are either `{:token, entry}` — `entry` being a + tag/attribute map from the token tables with at least the keys `:name`, + `:page` and `:token` (tags also carry `:options`) — or `{:literal, name}` + for names that have no token (`WBXML_VALUE_LITERAL`). This module treats + the entry as opaque and only reads `:name`. + """ + + defmodule Element do + @moduledoc "An element node. See `Libwbxml.Tree`." + defstruct name: nil, attrs: [], children: [] + + @type t :: %__MODULE__{ + name: Libwbxml.Tree.name(), + attrs: [Libwbxml.Tree.Attribute.t()], + children: [Libwbxml.Tree.tree_node()] + } + end + + defmodule Attribute do + @moduledoc "An attribute of an element. See `Libwbxml.Tree`." + defstruct name: nil, value: "" + + @type t :: %__MODULE__{name: Libwbxml.Tree.name(), value: String.t()} + end + + defmodule Text do + @moduledoc "A text node. See `Libwbxml.Tree`." + defstruct data: "" + + @type t :: %__MODULE__{data: String.t()} + end + + defmodule CData do + @moduledoc "A CDATA section; its children are `Libwbxml.Tree.Text` nodes." + defstruct children: [] + + @type t :: %__MODULE__{children: [Libwbxml.Tree.tree_node()]} + end + + defmodule PI do + @moduledoc "A processing instruction. See `Libwbxml.Tree`." + defstruct target: nil, data: nil + + @type t :: %__MODULE__{target: String.t() | nil, data: String.t() | nil} + end + + defmodule SubTree do + @moduledoc "An embedded document (SyncML DevInf / DM DDF). See `Libwbxml.Tree`." + defstruct tree: nil + + @type t :: %__MODULE__{tree: Libwbxml.Tree.t()} + end + + defstruct lang: nil, orig_charset: nil, root: nil + + @typedoc "A tokenised name (`{:token, table_entry}`) or a literal one." + @type name :: + {:token, %{required(:name) => String.t(), optional(atom()) => term()}} + | {:literal, String.t()} + + @type tree_node :: Element.t() | Text.t() | CData.t() | PI.t() | SubTree.t() + + @type t :: %__MODULE__{ + lang: atom() | nil, + orig_charset: non_neg_integer() | nil, + root: Element.t() | nil + } + + @typedoc """ + SyncML `` content type, as `WBXMLSyncMLDataType`: + + * `:normal` — no specific type + * `:wbxml` — `application/vnd.syncml-devinf+wbxml` or + `application/vnd.syncml.dmtnds+wbxml` (an embedded WBXML document) + * `:clear` — `text/clear` + * `:directory_vcard` — `text/directory;profile=vCard` + * `:vcard` — `text/x-vcard` + * `:vcalendar` — `text/x-vcalendar` + * `:vobject` — upstream's hack: any `` in an ``/`` item + """ + @type syncml_data_type :: + :normal | :wbxml | :clear | :directory_vcard | :vcard | :vcalendar | :vobject + + @doc """ + The XML name of an element or attribute node, or of a bare name + (`wbxml_tag_get_xml_name` / `wbxml_attribute_get_xml_name`). + + iex> Libwbxml.Tree.element_name(%Libwbxml.Tree.Element{name: {:literal, "Foo"}}) + "Foo" + iex> Libwbxml.Tree.element_name({:token, %{name: "Ping", page: 13, token: 5}}) + "Ping" + """ + @spec element_name(Element.t() | Attribute.t() | name()) :: String.t() + def element_name(%Element{name: name}), do: element_name(name) + def element_name(%Attribute{name: name}), do: element_name(name) + def element_name({:token, %{name: name}}), do: name + def element_name({:literal, name}) when is_binary(name), do: name + + @doc """ + True when at least one direct child is an `Element` + (`wbxml_tree_node_have_child_elt`). + """ + @spec has_child_element?(tree_node()) :: boolean() + def has_child_element?(%{children: children}) when is_list(children), + do: Enum.any?(children, &match?(%Element{}, &1)) + + def has_child_element?(_node), do: false + + @doc """ + Finds the first element named `name` in a list of sibling nodes + (`wbxml_tree_node_elt_get_from_name`). Non-element siblings are skipped. + With `recursive?` the search also descends, depth-first, into the children + of each element that does not match. + """ + @spec find_element([tree_node()], String.t(), boolean()) :: Element.t() | nil + def find_element(nodes, name, recursive? \\ false) + + def find_element([%Element{} = element | rest], name, recursive?) do + cond do + element_name(element) == name -> + element + + recursive? && element.children != [] -> + find_element(element.children, name, true) || find_element(rest, name, true) + + true -> + find_element(rest, name, recursive?) + end + end + + def find_element([_other | rest], name, recursive?), do: find_element(rest, name, recursive?) + def find_element([], _name, _recursive?), do: nil + + @doc """ + Determines the content type of a SyncML `` node + (`wbxml_tree_node_get_syncml_data_type`). + + `ancestors` is the chain of enclosing elements, nearest first (`[parent, + grandparent, …]`), which replaces upstream's parent pointers. For a `CData` + node the check is performed on its parent element instead. + + The rules, in upstream order: + + 1. Anything that is not an element named `Data` is `:normal`. + 2. Look for a `Meta` element among the parent's children, then among the + grandparent's children, and take the first `Type` element inside it + whose first child is a text node. Its text selects the type (see + `t:syncml_data_type/0`); the `+xml` variants of DevInf/DDF are `:normal`. + 3. Otherwise, if the grandparent is named `Add` or `Replace`, `:vobject`. + 4. Otherwise `:normal`. + """ + @spec syncml_data_type(tree_node(), [Element.t()]) :: syncml_data_type() + def syncml_data_type(node, ancestors) + + def syncml_data_type(%CData{}, [parent | ancestors]), do: syncml_data_type(parent, ancestors) + def syncml_data_type(%CData{}, []), do: :normal + + def syncml_data_type(%Element{} = node, ancestors) do + if element_name(node) == "Data" do + {parent, grandparent} = + case ancestors do + [p, g | _] -> {p, g} + [p] -> {p, nil} + [] -> {nil, nil} + end + + case type_text(parent) || type_text(grandparent) do + "application/vnd.syncml-devinf+wbxml" -> :wbxml + "application/vnd.syncml-devinf+xml" -> :normal + "application/vnd.syncml.dmtnds+wbxml" -> :wbxml + "application/vnd.syncml.dmtnds+xml" -> :normal + "text/clear" -> :clear + "text/directory;profile=vCard" -> :directory_vcard + "text/x-vcard" -> :vcard + "text/x-vcalendar" -> :vcalendar + _ -> vobject_hack(grandparent) + end + else + :normal + end + end + + def syncml_data_type(_node, _ancestors), do: :normal + + # Text of the first child of under `element`, if that child is + # a text node; nil otherwise (so the caller falls through to the next + # ancestor, exactly like upstream's chained && / || expression). + defp type_text(%Element{children: children}) do + with %Element{children: meta_children} <- find_element(children, "Meta"), + %Element{children: [%Text{data: data} | _]} <- find_element(meta_children, "Type") do + data + else + _ -> nil + end + end + + defp type_text(_other), do: nil + + defp vobject_hack(%Element{} = grandparent) do + if element_name(grandparent) in ["Add", "Replace"], do: :vobject, else: :normal + end + + defp vobject_hack(_other), do: :normal +end diff --git a/lib/libwbxml/xml/reader.ex b/lib/libwbxml/xml/reader.ex new file mode 100644 index 0000000..8bcb43d --- /dev/null +++ b/lib/libwbxml/xml/reader.ex @@ -0,0 +1,425 @@ +defmodule Libwbxml.XML.Reader do + @moduledoc """ + XML document → `Libwbxml.Tree`, the first half of `Libwbxml.encode/2`. + + Port of upstream `wbxml_tree_clb_xml.c` and `wbxml_tree_from_xml` + (libwbxml 0.11.10) onto OTP's `:xmerl_sax_parser`. Upstream drives expat + with namespace processing on (`XML_ParserCreateNS(NULL, '|')`), so this + module reproduces what expat hands to those callbacks: element and + attribute names as `uri|local` (bare `local` without a namespace), no + `xmlns` attributes, text merged into one node per run. + + ## What the reader does + + * **Language detection** (`wbxml_tables_search_table`): the DOCTYPE public + or system identifier first, then the root element (`uri|local`) if the + DOCTYPE gave nothing; `{:error, :unknown_xml_language}` otherwise. A + language passed in `opts.language` skips detection. + * **Names → tokens**: an element's namespace URI selects its code page + (`Libwbxml.Tables.page_for_xmlns/2`, page 0 when unknown) and the local + name is looked up there (`tag_from_xml/3`); attributes go through + `attr_from_xml/3` with their value. Unknown names become literals. + Prefixed element names lose their prefix (`o-ex:rights` is the literal + `rights`), exactly as upstream. + * **Binary tags** (`:binary` option, ActiveSync/AirSync): their text is + accumulated and base64-decoded at the end tag (`Libwbxml.Base64.decode/1`); + `{:error, :b64_dec}` if nothing decodes. + * **SyncML hacks** (`wbxml_tree_node_get_syncml_data_type`): text in a + `` element whose type is a vObject (or the `Add`/`Replace` item + heuristic) gets `\\n` turned into `\\r\\n` and is wrapped in an implicit + `CData` node, as is `text/clear` data. Applied for every language, as + upstream does. + * **Embedded documents**: `` and + `` below the root become + `Libwbxml.Tree.SubTree` nodes built with the DevInf/DDF tables that match + the SyncML version (upstream re-parses the raw bytes with a synthetic + DOCTYPE; the tree is the same). + * Comments and processing instructions are dropped. Whitespace-only text + (`ignorableWhitespace`) is kept in the tree, like expat's character data; + the encoder decides whether to drop it. + * The XML declaration's `encoding` is recorded as `orig_charset` (MIBenum, + `nil` when absent or unknown). + + ## Errors + + Any XML the parser rejects (including trailing content after the root + element, which expat also rejects) gives `{:error, :xml_parsing_failed}`; + an empty document gives `{:error, :bad_parameter}` as upstream's + converter does. `read/2` never raises. + + External DTDs are never fetched, as with upstream. One known difference: + a reference to an entity that is not one of the five predefined ones and + is not declared in the internal subset (` ` in a document that only + references an external DTD) is silently dropped by expat but rejected + here with `:xml_parsing_failed` — xmerl can only fail on it or pass the + reference through as literal text. + """ + + alias Libwbxml.{Base64, Charset, Tables, Tree} + alias Libwbxml.Tables.Language + alias Libwbxml.Tree.{Attribute, CData, Element, SubTree, Text} + + @typedoc "Options: `:language` forces the language (`nil` detects it)." + @type opts :: %{optional(:language) => atom() | nil, optional(atom()) => term()} + + # Parser state; one per document, chained through `parent` while an + # embedded DevInf/DDF document is being read. + defmodule State do + @moduledoc false + defstruct lang: nil, stack: [], root: nil, error: nil, parent: nil + end + + @devinf_root {"syncml:devinf", "DevInf"} + @ddf_root {"syncml:dmddf1.2", "MgmtTree"} + + @doc """ + Parses `xml` into a `Libwbxml.Tree`. See the module documentation. + """ + @spec read(binary(), opts()) :: {:ok, Tree.t()} | {:error, Libwbxml.Error.reason()} + def read(xml, opts \\ %{}) + + def read("", _opts), do: {:error, :bad_parameter} + + def read(xml, opts) when is_binary(xml) do + lang = + case Map.get(opts, :language) do + nil -> nil + atom -> Tables.get(atom) + end + + state = %State{lang: lang} + + result = + try do + :xmerl_sax_parser.stream(xml, [ + {:external_entities, :none}, + event_fun: &handle_event/3, + event_state: state + ]) + rescue + _ -> :failed + catch + _, _ -> :failed + end + + case result do + {:ok, %State{} = state, rest} -> + cond do + not blank?(IO.iodata_to_binary(rest)) -> + {:error, :xml_parsing_failed} + + state.error != nil -> + {:error, state.error} + + state.parent != nil or state.root == nil -> + {:error, :xml_parsing_failed} + + true -> + {:ok, %Tree{lang: state.lang.lang, orig_charset: charset(xml), root: state.root}} + end + + _other -> + {:error, :xml_parsing_failed} + end + end + + ## Event handling (one clause per expat callback that upstream registers) + + # Any event after an error is ignored, like upstream's `tree_ctx->error` + # check; the XML parser still runs to the end so that a later syntax error + # wins, as it does in C. + defp handle_event(_event, _location, %State{error: error} = state) when error != nil, + do: state + + # wbxml_tree_clb_xml_doctype_decl + defp handle_event( + {:startDTD, _name, public_id, system_id}, + _location, + %State{lang: nil} = state + ) do + %{state | lang: Tables.search(to_binary_or_nil(public_id), to_binary_or_nil(system_id), nil)} + end + + # wbxml_tree_clb_xml_start_element + defp handle_event({:startElement, uri, local, _qname, attrs}, _location, state) do + ns = to_binary(uri) + local = to_binary(local) + + cond do + state.stack == [] and state.lang == nil -> + case Tables.search(nil, nil, {ns, local}) do + nil -> fail(state, :unknown_xml_language) + lang -> start_element(%{state | lang: lang}, ns, local, attrs) + end + + state.stack != [] and {ns, local} in [@devinf_root, @ddf_root] -> + case embedded_language(state.lang, {ns, local}) do + nil -> fail(state, :unknown_xml_language) + lang -> start_element(%State{lang: lang, parent: state}, ns, local, attrs) + end + + true -> + start_element(state, ns, local, attrs) + end + end + + # wbxml_tree_clb_xml_end_element + defp handle_event({:endElement, _uri, _local, _qname}, _location, state) do + state = close_implicit_cdata(state) + + case state.stack do + [%{kind: :element} = frame | rest] -> + case finish_element(frame) do + {:ok, element} -> add_finished(%{state | stack: rest}, element) + {:error, reason} -> fail(state, reason) + end + + _other -> + fail(state, :internal) + end + end + + # wbxml_tree_clb_xml_characters. Expat has no DTD knowledge and reports + # every run of character data the same way, so ignorable whitespace is + # ordinary text here too. + defp handle_event({:characters, chars}, _location, state), do: characters(state, chars) + + defp handle_event({:ignorableWhitespace, chars}, _location, state), + do: characters(state, chars) + + # wbxml_tree_clb_xml_start_cdata / end_cdata + defp handle_event(:startCDATA, _location, %State{stack: []} = state), do: fail(state, :internal) + + defp handle_event(:startCDATA, _location, state), do: push_cdata(state) + + defp handle_event(:endCDATA, _location, state) do + case state.stack do + [%{kind: :cdata} = frame | rest] -> + add_child(%{state | stack: rest}, %CData{children: Enum.reverse(frame.children)}) + + _other -> + fail(state, :internal) + end + end + + # Processing instructions and comments are ignored (upstream's PI callback + # is a no-op and it registers no comment handler). + defp handle_event(_event, _location, state), do: state + + ## Elements + + # wbxml_tree_add_xml_elt_with_attrs: the namespace selects the code page, + # the local name is looked up there; attributes are resolved with their + # value. `xmlns` attributes never arrive (xmerl consumes them, as expat + # does). + defp start_element(%State{lang: lang} = state, ns, local, attrs) do + page = Tables.page_for_xmlns(lang, ns) + + name = + case Tables.tag_from_xml(lang, page, local) do + nil -> {:literal, local} + entry -> {:token, entry} + end + + attrs = Enum.map(attrs, &attribute(lang, &1)) + + frame = %{ + kind: :element, + name: name, + attrs: attrs, + children: [], + first_child_cdata?: false, + binary?: binary_tag?(name), + content: nil + } + + %{state | stack: [frame | state.stack]} + end + + # wbxml_tree_node_add_xml_attr. Namespaced attributes are named + # `uri|local`, as expat delivers them. + defp attribute(lang, {uri, _prefix, local, value}) do + name = + case to_binary(uri) do + "" -> to_binary(local) + ns -> ns <> "|" <> to_binary(local) + end + + value = to_binary(value) + + case Tables.attr_from_xml(lang, name, value) do + nil -> %Attribute{name: {:literal, name}, value: value} + {entry, _value_left} -> %Attribute{name: {:token, entry}, value: value} + end + end + + defp binary_tag?({:token, %{options: options}}), do: MapSet.member?(options, :binary) + defp binary_tag?(_name), do: false + + # End of a binary element: its accumulated text is base64 and is decoded + # into a regular text node in one step (wbxml_tree_clb_xml_end_element). + defp finish_element(%{binary?: true, content: content} = frame) when content != nil do + case Base64.decode(IO.iodata_to_binary(content)) do + {:ok, bytes} -> + frame = add_text_to_frame(frame, bytes) + {:ok, build_element(frame)} + + {:error, reason} -> + {:error, reason} + end + end + + defp finish_element(frame), do: {:ok, build_element(frame)} + + defp build_element(frame), + do: %Element{name: frame.name, attrs: frame.attrs, children: Enum.reverse(frame.children)} + + # A closed element goes to its parent, becomes the document root, or — + # for an embedded DevInf/DDF document — becomes a SubTree node of the + # enclosing document's current element. + defp add_finished(%State{stack: [], parent: nil} = state, element), + do: %{state | root: element} + + defp add_finished(%State{stack: [], parent: parent} = state, element) do + tree = %Tree{lang: state.lang.lang, orig_charset: nil, root: element} + add_child(parent, %SubTree{tree: tree}) + end + + defp add_finished(state, element), do: add_child(state, element) + + # wbxml_tree_clb_xml_end_element: an implicit CDATA section (see + # `characters/2`) ends with the element that contains it. + defp close_implicit_cdata(%State{stack: [%{kind: :cdata} = frame | rest]} = state), + do: add_child(%{state | stack: rest}, %CData{children: Enum.reverse(frame.children)}) + + defp close_implicit_cdata(state), do: state + + # The DevInf/DDF table for an embedded document, chosen by the enclosing + # SyncML version; `nil` when the combination is not allowed. + defp embedded_language(%Language{lang: :syncml10}, @devinf_root), do: Tables.get(:devinf10) + defp embedded_language(%Language{lang: :syncml11}, @devinf_root), do: Tables.get(:devinf11) + defp embedded_language(%Language{lang: :syncml12}, @devinf_root), do: Tables.get(:devinf12) + defp embedded_language(%Language{lang: :syncml12}, @ddf_root), do: Tables.get(:dmddf12) + defp embedded_language(_lang, _root), do: nil + + ## Text + + defp characters(%State{stack: []} = state, _chars), do: state + + defp characters(state, chars) do + text = to_binary(chars) + + {text, state} = + case syncml_data_type(state) do + type when type in [:directory_vcard, :vcalendar, :vcard, :vobject] -> + # vObject line breaks must survive as CRLF: expat reports every + # newline as its own one-byte chunk, which upstream turns into + # "\r\n"; converting all of them is the same thing. + {:binary.replace(text, "\n", "\r\n", [:global]), ensure_cdata(state)} + + :clear -> + {text, ensure_cdata(state)} + + _normal -> + {text, state} + end + + case state.stack do + # Binary tags cache their (base64) text for decoding at the end tag. + [%{kind: :element, binary?: true} = frame | rest] -> + %{state | stack: [%{frame | content: [frame.content || [], text]} | rest]} + + [frame | rest] -> + %{state | stack: [add_text_to_frame(frame, text) | rest]} + end + end + + # wbxml_tree_node_get_syncml_data_type for the node text is about to be + # added to. Only a `` element (or the CDATA node inside one) can + # have a type, so the ancestor elements are only materialised then. + defp syncml_data_type(%State{stack: [%{kind: :cdata} | rest]}), do: data_type(rest) + defp syncml_data_type(%State{stack: stack}), do: data_type(stack) + + defp data_type([%{kind: :element, name: name} | ancestors]) do + if Tree.element_name(name) == "Data" do + Tree.syncml_data_type( + %Element{name: name}, + ancestors |> Enum.take(2) |> Enum.map(&frame_to_node/1) + ) + else + :normal + end + end + + defp data_type(_stack), do: :normal + + defp frame_to_node(%{kind: :element} = frame), + do: %Element{name: frame.name, attrs: frame.attrs, children: Enum.reverse(frame.children)} + + defp frame_to_node(%{kind: :cdata} = frame), do: %CData{children: Enum.reverse(frame.children)} + + # Adds the "missing" CDATA section of erroneous SyncML documents, unless + # we are already in one or the element's first child is one (the text + # after an explicit `]]>` must not be wrapped). + defp ensure_cdata(%State{stack: [%{kind: :element, first_child_cdata?: false} | _]} = state), + do: push_cdata(state) + + defp ensure_cdata(state), do: state + + defp push_cdata(%State{stack: [parent | rest]} = state) do + parent = + if parent.kind == :element and parent.children == [], + do: %{parent | first_child_cdata?: true}, + else: parent + + %{state | stack: [%{kind: :cdata, children: []}, parent | rest]} + end + + # wbxml_tree_add_node: consecutive text is joined into one node, because + # expat splits text at entities and line breaks. + defp add_text_to_frame(%{children: [%Text{data: data} | rest]} = frame, text), + do: %{frame | children: [%Text{data: data <> text} | rest]} + + defp add_text_to_frame(frame, text), + do: %{frame | children: [%Text{data: text} | frame.children]} + + defp add_child(%State{stack: [frame | rest]} = state, child) do + frame = + if frame.kind == :element and frame.children == [] and match?(%CData{}, child), + do: %{frame | first_child_cdata?: true}, + else: frame + + %{state | stack: [%{frame | children: [child | frame.children]} | rest]} + end + + defp add_child(%State{stack: []} = state, _child), do: fail(state, :internal) + + defp fail(state, reason), do: %{state | error: reason} + + ## Helpers + + # The `encoding` pseudo-attribute of the XML declaration, as + # wbxml_tree_clb_xml_decl records it (xmerl has no event for it). + defp charset(xml) do + prefix = binary_part(xml, 0, min(byte_size(xml), 256)) + + with [_, _quote, name] <- + Regex.run(~r/\A\s*<\?xml\s[^>]*?encoding\s*=\s*(["'])([^"']*)\1/, prefix), + {:ok, mib} <- Charset.from_name(name) do + mib + else + _ -> nil + end + end + + defp to_binary([]), do: "" + defp to_binary(chars) when is_list(chars), do: :unicode.characters_to_binary(chars) + defp to_binary(binary) when is_binary(binary), do: binary + + defp to_binary_or_nil([]), do: nil + defp to_binary_or_nil(chars), do: to_binary(chars) + + defp blank?(<>) when byte in [?\s, ?\t, ?\n, ?\r], do: blank?(rest) + defp blank?(<<>>), do: true + defp blank?(_), do: false +end diff --git a/lib/libwbxml/xml/writer.ex b/lib/libwbxml/xml/writer.ex new file mode 100644 index 0000000..07cde67 --- /dev/null +++ b/lib/libwbxml/xml/writer.ex @@ -0,0 +1,419 @@ +defmodule Libwbxml.XML.Writer do + @moduledoc """ + XML writer: renders a `Libwbxml.Tree` as an XML document, byte for byte as + upstream `wbxml2xml` does. + + Port of the XML half of `wbxml_encoder.c` (libwbxml 0.11.10): the node + walker `parse_node` and the `xml_*` output functions, including the + encoder's mutable state (`indent`, `in_content`, `in_cdata`, `current_tag`) + which is threaded through as a struct. The output is built as iodata. + + ## Output + + * Header: `` followed by + ``, or `` for languages without an XML public ID (OTA Settings). No + `encoding` attribute is ever written. In `:indent` format both lines end + with a newline; `:compact` and `:canonical` write no newline anywhere. + * Elements: `xmlns="..."` is added to the root element and to every element + whose code page differs from its parent's, for languages with a + namespace table. Empty elements are written as ``. Attributes are + written only for languages that have an attribute table, in tree order. + * `:indent` format writes one element per line, each indented by + `opts.indent` spaces per nesting level; elements with no child element + keep their text on the same line. Whitespace-only text nodes are dropped + and leading/trailing blanks of other text nodes are removed unless + `opts.preserve_whitespace` is set. `:compact` is the same without any + newline or indentation. `:canonical` keeps every text node verbatim and + additionally escapes `\\r`, `\\n` and `\\t` as character references. + * Text: `<`, `>`, `&`, `"` and `'` are escaped as entities, in text and in + attribute values alike. Text under a `:binary` tag (ActiveSync/AirSync + opaque content) is base64-encoded. In SyncML a `` of + `application/vnd.syncml-devinf+wbxml` (or `.dmtnds+wbxml`) is rewritten to + its `+xml` counterpart. + * `CData` nodes become `` with their text untouched, and + `SubTree` nodes (embedded DevInf/DDF documents) are rendered inline + without header or DOCTYPE, at the current indentation. `PI` nodes are + not supported (`:not_implemented`, as upstream). + + Two upstream quirks are reproduced on purpose; see the `NOTE(upstream-quirk)` + comments. + """ + + alias Libwbxml.{Base64, Tables, Tree} + alias Libwbxml.Encoder.Strings + alias Libwbxml.Tables.Language + alias Libwbxml.Tree.{Attribute, CData, Element, PI, SubTree, Text} + + @xml_header "" + @new_line "\n" + + @syncml_langs [:syncml10, :syncml11, :syncml12] + + defmodule State do + @moduledoc false + # The XML-relevant fields of upstream's `WBXMLEncoder`. `out` is the + # output so far, as reversed iodata. + defstruct lang: nil, + format: :indent, + delta: 0, + ignore_empty_text: true, + strip_blanks: true, + indent: 0, + in_content: false, + in_cdata: false, + current_tag: nil, + out: [] + end + + @type reason :: Libwbxml.Error.reason() + + @typedoc """ + Writer options: `:format` (`:indent`, `:compact` or `:canonical`, default + `:indent`), `:indent` (spaces per level in `:indent` format, default `0`) + and `:preserve_whitespace` (default `false`). Other keys are ignored. + """ + @type opts :: %{ + optional(:format) => :indent | :compact | :canonical, + optional(:indent) => non_neg_integer(), + optional(:preserve_whitespace) => boolean() + } + + @doc """ + Renders `tree` as XML with the default options (`:indent` format, no + indentation). Same as `write(tree, %{})`. + """ + @spec write(Tree.t()) :: {:ok, binary()} | {:error, reason()} + def write(tree), do: write(tree, %{}) + + @doc """ + Renders `tree` as an XML document. + + `opts` is the validated option map of `Libwbxml.decode/2` (see `t:opts/0`). + A tree without a language is `{:error, :lang_table_undefined}` (upstream + fails in `xml_fill_header`); a tree without a root is + `{:error, :bad_parameter}`. + + iex> tree = %Libwbxml.Tree{lang: :si10, root: %Libwbxml.Tree.Element{name: {:literal, "si"}}} + iex> Libwbxml.XML.Writer.write(tree, %{format: :compact}) + {:ok, ~s()} + """ + @spec write(Tree.t(), opts()) :: {:ok, binary()} | {:error, reason()} + def write(%Tree{} = tree, opts) when is_map(opts) do + format = Map.get(opts, :format, :indent) + keep_ws = Map.get(opts, :preserve_whitespace, false) + + state = %State{ + format: format, + # wbxml_tree_to_xml() only passes the delta on for the indent format. + delta: if(format == :indent, do: Map.get(opts, :indent, 0), else: 0), + ignore_empty_text: not keep_ws, + strip_blanks: not keep_ws + } + + try do + lang = language!(tree, :lang_table_undefined) + root = tree.root || fail(:bad_parameter) + body = encode_node(root, nil, %{state | lang: lang}) + {:ok, IO.iodata_to_binary([header(lang, format) | Enum.reverse(body.out)])} + catch + {:wbxml_error, reason} -> {:error, reason} + end + end + + ## Errors + + defp fail(reason), do: throw({:wbxml_error, reason}) + + defp language!(%Tree{lang: lang}, reason) do + (is_atom(lang) and lang != nil and Tables.get(lang)) || fail(reason) + end + + ## Header (xml_fill_header) + + defp header(%Language{public_id: public_id}, format) do + nl = if format == :indent, do: @new_line, else: [] + + doctype_id = + case public_id.xml_public_id do + id when is_binary(id) and id != "" -> [" PUBLIC \"", id, "\""] + _none -> " SYSTEM" + end + + [ + @xml_header, + nl, + "", + nl + ] + end + + ## Node walker (parse_node) + + # `parent` is the name of the enclosing element (`nil` for a root, `:cdata` + # inside a CDATA section); it replaces upstream's `node->parent`. + defp encode_node(%Element{} = element, parent, state) do + state = + state + |> encode_tag(element, parent) + |> encode_attrs(element) + |> encode_end_attrs(element) + |> encode_children(element.children, element.name) + + state = + if element.children == [], do: state, else: encode_end_tag(state, element) + + %{state | current_tag: nil} + end + + defp encode_node(%Text{data: data}, _parent, state) do + %{encode_text(state, data) | current_tag: nil} + end + + defp encode_node(%CData{children: children}, _parent, state) do + state = + %{state | in_cdata: true} + |> out(" encode_children(children, :cdata) + + %{out(%{state | in_cdata: false}, "]]>") | current_tag: nil} + end + + defp encode_node(%PI{}, _parent, _state), do: fail(:not_implemented) + + # xml_encode_tree(): a fresh encoder without header, starting at the + # current indentation. + defp encode_node(%SubTree{tree: %Tree{} = tree}, _parent, %State{} = state) do + sub = %State{ + state + | lang: language!(tree, :bad_parameter), + in_content: false, + in_cdata: false, + current_tag: nil, + out: [] + } + + root = tree.root || fail(:bad_parameter) + sub = encode_node(root, nil, sub) + %{state | out: [Enum.reverse(sub.out) | state.out], current_tag: nil} + end + + defp encode_node(_other, _parent, _state), do: fail(:xml_node_not_allowed) + + defp encode_children(state, children, parent) do + Enum.reduce(children, state, &encode_node(&1, parent, &2)) + end + + ## Elements + + # xml_encode_tag() + defp encode_tag(state, %Element{name: name}, parent) do + current_tag = + case name do + {:token, entry} -> entry + {:literal, _} -> nil + end + + state = %{state | current_tag: current_tag} + out(state, [indent(state), "<", Tree.element_name(name), xmlns(state, name, parent)]) + end + + # The namespace is written for the root element and whenever the code page + # differs from the parent element's; only token/token pairs are compared. + defp xmlns(%State{lang: %Language{namespaces: []}}, _name, _parent), do: [] + + defp xmlns(state, name, parent) do + page = + case {name, parent} do + {{:token, %{page: page}}, nil} -> + page + + # NOTE(upstream-quirk): for a literal root element upstream reads + # `node->name->u.token->wbxmlCodePage` from the wrong union member, + # which on the reference platform is the low byte of the literal + # name's length. `` (7 bytes) thus gets the namespace of + # code page 7 when the language has one. + {{:literal, literal}, nil} -> + rem(byte_size(literal), 256) + + {{:token, %{page: page}}, {:token, %{page: parent_page}}} when page != parent_page -> + page + + _ -> + nil + end + + case page && Tables.xmlns_for_page(state.lang, page) do + nil -> [] + uri -> [" xmlns=\"", uri, "\""] + end + end + + # parse_attribute() returns early when the language has no attribute table. + defp encode_attrs(%State{lang: %Language{attrs: []}} = state, _element), do: state + + defp encode_attrs(state, %Element{attrs: attrs}) do + Enum.reduce(attrs, state, fn %Attribute{name: name, value: value}, state -> + out(state, [" ", Tree.element_name(name), "=\"", escape_for(value || "", state), "\""]) + end) + end + + # xml_encode_end_attrs() + defp encode_end_attrs(state, %Element{children: []}) do + out(state, ["/>", new_line(state)]) + end + + defp encode_end_attrs(%State{format: :indent} = state, element) do + state = out(state, ">") + + if Tree.has_child_element?(element) do + %{out(state, @new_line) | indent: state.indent + 1} + else + state + end + end + + defp encode_end_attrs(state, _element), do: out(state, ">") + + # xml_encode_end_tag() + defp encode_end_tag(state, %Element{name: name} = element) do + state = + if state.format == :indent and Tree.has_child_element?(element) do + state = if state.in_content, do: out(state, @new_line), else: state + state = %{state | indent: state.indent - 1} + out(state, indent(state)) + else + state + end + + state = out(state, ["", new_line(state)]) + %{state | in_content: false} + end + + ## Text (parse_text + xml_encode_text) + + defp encode_text(state, data) do + binary? = binary_tag?(state.current_tag) + + verbatim? = state.in_cdata or binary? or state.format == :canonical + + cond do + verbatim? -> + encode_text_data(state, data, binary?) + + state.ignore_empty_text and Strings.only_whitespace?(data) -> + state + + state.strip_blanks -> + encode_text_data(state, Strings.strip_blanks(data), binary?) + + true -> + encode_text_data(state, data, binary?) + end + end + + defp encode_text_data(%State{in_cdata: true} = state, data, _binary?) do + %{out(state, data) | in_content: true} + end + + defp encode_text_data(state, data, binary?) do + data = syncml_type_fixup(state, data) + data = if binary?, do: base64!(data), else: data + %{out(state, escape_for(data, state)) | in_content: true} + end + + defp binary_tag?(%{options: options}), do: MapSet.member?(options, :binary) + defp binary_tag?(_tag), do: false + + # wbxml_buffer_encode_base64(): wbxml_base64_encode() returns NULL for an + # empty buffer. + defp base64!(<<>>), do: fail(:b64_enc) + defp base64!(data), do: Base64.encode(data) + + # The text of a SyncML (page 1, token 0x13) announcing an embedded + # WBXML document is rewritten, since the sub-tree is written as XML. + defp syncml_type_fixup( + %State{lang: %Language{lang: lang}, current_tag: %{page: 1, token: 0x13}}, + data + ) + when lang in @syncml_langs do + case data do + "application/vnd.syncml-devinf+wbxml" -> + "application/vnd.syncml-devinf+xml" + + "application/vnd.syncml.dmtnds+wbxml" when lang == :syncml12 -> + "application/vnd.syncml.dmtnds+xml" + + _ -> + data + end + end + + defp syncml_type_fixup(_state, data), do: data + + ## Output helpers + + defp out(%State{out: acc} = state, iodata), do: %{state | out: [iodata | acc]} + + defp new_line(%State{format: :indent}), do: @new_line + defp new_line(_state), do: [] + + defp indent(%State{format: :indent, indent: level, delta: delta}) when level * delta > 0, + do: :binary.copy(" ", level * delta) + + defp indent(_state), do: [] + + @doc """ + Escapes text for XML output (`xml_encode_text_entities`): `<`, `>`, `&`, + `"` and `'` become entities; with `normalize?` (canonical format) `\\r`, + `\\n` and `\\t` become ` `, ` ` and ` `. Returns iodata. + + iex> IO.iodata_to_binary(Libwbxml.XML.Writer.escape(~s(a IO.iodata_to_binary(Libwbxml.XML.Writer.escape("a\\nb", true)) + "a b" + """ + @spec escape(binary(), boolean()) :: iodata() + def escape(data, normalize?) when is_binary(data) and is_boolean(normalize?) do + escape(data, 0, 0, normalize?, []) + end + + defp escape_for(data, %State{format: format}), do: escape(data, format == :canonical) + + defp escape(data, start, pos, normalize?, acc) when pos < byte_size(data) do + case :binary.at(data, pos) do + byte when byte in [?<, ?>, ?&, ?", ?'] -> + escape_at(data, start, pos, normalize?, acc, entity(byte)) + + byte when normalize? and byte in [?\r, ?\n, ?\t] -> + escape_at(data, start, pos, normalize?, acc, entity(byte)) + + _byte -> + escape(data, start, pos + 1, normalize?, acc) + end + end + + defp escape(data, 0, _pos, _normalize?, []), do: data + + defp escape(data, start, pos, _normalize?, acc), + do: Enum.reverse([binary_part(data, start, pos - start) | acc]) + + defp escape_at(data, start, pos, normalize?, acc, entity) do + acc = [entity, binary_part(data, start, pos - start) | acc] + escape(data, pos + 1, pos + 1, normalize?, acc) + end + + defp entity(?<), do: "<" + defp entity(?>), do: ">" + defp entity(?&), do: "&" + defp entity(?"), do: """ + defp entity(?'), do: "'" + defp entity(?\r), do: " " + defp entity(?\n), do: " " + defp entity(?\t), do: " " +end diff --git a/mix.exs b/mix.exs index 23d2783..97ad68a 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Libwbxml.MixProject do use Mix.Project - @version "0.1.0" + @version "0.2.0" @source_url "https://github.com/Jump-App/libwbxml" def project do @@ -9,39 +9,51 @@ defmodule Libwbxml.MixProject do app: :libwbxml, version: @version, elixir: "~> 1.19", - elixirc_paths: ["lib"], + elixirc_paths: elixirc_paths(Mix.env()), + test_ignore_filters: [&String.starts_with?(&1, "test/fixtures/")], start_permanent: Mix.env() == :prod, - compilers: [:elixir_make] ++ Mix.compilers(), - make_clean: ["clean"], - make_force_build: System.get_env("LIBWBXML_FORCE_BUILD") == "true", - make_precompiler: {:nif, CCPrecompiler}, - make_precompiler_filename: "wbxml_nif", - make_precompiler_url: "#{@source_url}/releases/download/v#{@version}/@{artefact_filename}", + description: description(), package: package(), + docs: docs(), deps: deps() ] end + # The XML reader parses with OTP's xmerl (:xmerl_sax_parser). + def application do + [extra_applications: [:xmerl]] + end + + defp elixirc_paths(:test), do: ["lib", "test/support"] + defp elixirc_paths(_), do: ["lib"] + defp deps do [ - {:elixir_make, "~> 0.9.0", runtime: false}, - {:cc_precompiler, "~> 0.1", runtime: false} + {:ex_doc, "~> 0.34", only: :dev, runtime: false} ] end + defp description do + "Pure-Elixir WBXML encoder/decoder: a port of libwbxml 0.11.10 with the " <> + "same token tables and byte-identical output (ActiveSync, SyncML, WML, " <> + "SI/SL, Wireless Village and 20 more languages)." + end + defp package do [ - files: [ - "lib", - "native", - "vendor", - "checksum.exs", - "Makefile", - "mix.exs", - "README.md" - ], + files: ["lib", "mix.exs", "README.md", "CHANGELOG.md", "LICENSE", "NOTICE"], maintainers: ["Jump AI"], - licenses: ["MIT"] + licenses: ["LGPL-2.1-or-later"], + links: %{"GitHub" => @source_url} + ] + end + + defp docs do + [ + main: "readme", + source_url: @source_url, + source_ref: "v#{@version}", + extras: ["README.md", "CHANGELOG.md"] ] end end diff --git a/mix.lock b/mix.lock index d499a24..76ff16d 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,8 @@ %{ - "cc_precompiler": {:hex, :cc_precompiler, "0.1.11", "8c844d0b9fb98a3edea067f94f616b3f6b29b959b6b3bf25fee94ffe34364768", [:mix], [{:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3427232caf0835f94680e5bcf082408a70b48ad68a5f5c0b02a3bea9f3a075b9"}, - "elixir_cmake": {:hex, :elixir_cmake, "0.8.0", "675a8d0b401096dee01dd5b1108e86e5f399db01c3e34edc0f92034bf38d8764", [:mix], [], "hexpm", "afd87e2ed89dc02eb3efc4e9025a0b79c8322bea8a5f6d9abc6063ca696a67f8"}, - "elixir_make": {:hex, :elixir_make, "0.9.0", "6484b3cd8c0cee58f09f05ecaf1a140a8c97670671a6a0e7ab4dc326c3109726", [:mix], [], "hexpm", "db23d4fd8b757462ad02f8aa73431a426fe6671c80b200d9710caf3d1dd0ffdb"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.46", "67607a0532e810c6f630a515c548d0b24949643f168cc556303bee4cf96105c7", [:mix], [], "hexpm", "9c44636e8a1c68c62f526b2dcd85d941dbbcee7ab82cf64ba06ce28bef8e89f5"}, + "ex_doc": {:hex, :ex_doc, "0.40.4", "66f2e42bf588594d5a8aab31cad87f2ddad09d0da1b1a2f379340ec2c2e497cb", [:mix], [{:earmark_parser, "~> 1.4.46", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "6222b9e423d76584ee34df2c82a5ed72c2d53dc153f7f483ad28b378694186cc"}, + "makeup": {:hex, :makeup, "1.2.2", "882d46dc0905e9ff7abf2aab61a7e6b3dcc555533977d8a23b06019e6c89ac94", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "9a1a24e5b343b8ae16abea0822c10a6f75da27af7fa802ada5251f7579bfccfa"}, + "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.1.0", "835f7e60792e08824cda445639555d7bf1bbbddb1b60b306e33cb6f6db24dc74", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "1cd6780fb1dd1a03979abaed0fe82712b0625118fd5257d3ebbf73f960c73c3c"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"}, } diff --git a/native/wbxml_config.h b/native/wbxml_config.h deleted file mode 100644 index 8da5d4e..0000000 --- a/native/wbxml_config.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef WBXML_CONFIG_H -#define WBXML_CONFIG_H - -#define WBXML_LIB_VERSION "1.2.3" -#define WBXML_ENCODER_USE_STRTBL 1 -#define WBXML_SUPPORT_WML 1 -#define WBXML_SUPPORT_WTA 1 -#define WBXML_SUPPORT_SI 1 -#define WBXML_SUPPORT_SL 1 -#define WBXML_SUPPORT_CO 1 -#define WBXML_SUPPORT_PROV 1 -#define WBXML_SUPPORT_EMN 1 -#define WBXML_SUPPORT_DRMREL 1 -#define WBXML_SUPPORT_OTA_SETTINGS 1 -#define WBXML_SUPPORT_SYNCML 1 -#define WBXML_SUPPORT_WV 1 -#define WBXML_SUPPORT_AIRSYNC 1 -#define WBXML_SUPPORT_CONML 1 - -#endif /* WBXML_CONFIG_H */ diff --git a/native/wbxml_config_internals.h b/native/wbxml_config_internals.h deleted file mode 100644 index 5c9df63..0000000 --- a/native/wbxml_config_internals.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef WBXML_CONFIG_INTERNALS_H -#define WBXML_CONFIG_INTERNALS_H - -#include "wbxml_config.h" - -#define HAVE_EXPAT 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_VPRINTF 1 -#define STDC_HEADERS 1 - -#include - -#endif /* WBXML_CONFIG_INTERNALS_H */ diff --git a/native/wbxml_nif.c b/native/wbxml_nif.c deleted file mode 100644 index ef5a867..0000000 --- a/native/wbxml_nif.c +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -#include // Include for free() - - -static ERL_NIF_TERM wbxml_to_xml_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { - ErlNifBinary wbxml_bin; - - if (!enif_inspect_binary(env, argv[0], &wbxml_bin)) { - return enif_make_badarg(env); - } - - WBXMLConvWBXML2XML* conv = NULL; - WBXMLError ret = WBXML_OK; - WB_UTINY* xml_output = NULL; - WB_ULONG xml_len = 0; - - ret = wbxml_conv_wbxml2xml_create(&conv); - if (ret != WBXML_OK) goto error; - - // Set the language to ActiveSync - wbxml_conv_wbxml2xml_set_language(conv, WBXML_LANG_ACTIVESYNC); - - - ret = wbxml_conv_wbxml2xml_run(conv, wbxml_bin.data, wbxml_bin.size, &xml_output, &xml_len); - if (ret != WBXML_OK) goto error; - - ERL_NIF_TERM result = enif_make_string_len(env, (char*)xml_output, xml_len, ERL_NIF_LATIN1); - - wbxml_conv_wbxml2xml_destroy(conv); - free(xml_output); - - return enif_make_tuple2(env, enif_make_atom(env, "ok"), result); - -error: - if (conv) wbxml_conv_wbxml2xml_destroy(conv); - if (xml_output) free(xml_output); - - return enif_make_tuple2(env, enif_make_atom(env, "error"), enif_make_string(env, wbxml_errors_string(ret), ERL_NIF_LATIN1)); -} - -static ERL_NIF_TERM xml_to_wbxml_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { - ErlNifBinary xml_bin; - - if (!enif_inspect_binary(env, argv[0], &xml_bin)) { - return enif_make_badarg(env); - } - - WBXMLConvXML2WBXML* conv = NULL; - WBXMLError ret = WBXML_OK; - WB_UTINY* wbxml_output = NULL; - WB_ULONG wbxml_len = 0; - - ret = wbxml_conv_xml2wbxml_create(&conv); - if (ret != WBXML_OK) goto error; - - // Disable public ID - wbxml_conv_xml2wbxml_disable_public_id(conv); - - ret = wbxml_conv_xml2wbxml_run(conv, xml_bin.data, xml_bin.size, &wbxml_output, &wbxml_len); - if (ret != WBXML_OK) goto error; - - ErlNifBinary wbxml_bin; - enif_alloc_binary(wbxml_len, &wbxml_bin); - memcpy(wbxml_bin.data, wbxml_output, wbxml_len); - - wbxml_conv_xml2wbxml_destroy(conv); - free(wbxml_output); - - return enif_make_tuple2(env, enif_make_atom(env, "ok"), enif_make_binary(env, &wbxml_bin)); - -error: - if (conv) wbxml_conv_xml2wbxml_destroy(conv); - if (wbxml_output) free(wbxml_output); - - return enif_make_tuple2(env, enif_make_atom(env, "error"), enif_make_string(env, wbxml_errors_string(ret), ERL_NIF_LATIN1)); -} - -static ErlNifFunc nif_funcs[] = { - {"decode", 1, wbxml_to_xml_nif}, - {"encode", 1, xml_to_wbxml_nif} -}; - -static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info) { - // Handle any necessary state transfer or initialization for the upgrade - return 0; // Return 0 on success -} - -ERL_NIF_INIT(Elixir.Libwbxml, nif_funcs, NULL, NULL, NULL, NULL) diff --git a/test/fixtures/fuzz/sigabrt-1.fuzz b/test/fixtures/fuzz/sigabrt-1.fuzz new file mode 100644 index 0000000..5e59f68 Binary files /dev/null and b/test/fixtures/fuzz/sigabrt-1.fuzz differ diff --git a/test/fixtures/fuzz/sigsegv-1.fuzz b/test/fixtures/fuzz/sigsegv-1.fuzz new file mode 100644 index 0000000..791f565 Binary files /dev/null and b/test/fixtures/fuzz/sigsegv-1.fuzz differ diff --git a/test/fixtures/fuzz/sigsegv-2.fuzz b/test/fixtures/fuzz/sigsegv-2.fuzz new file mode 100644 index 0000000..894cc1d Binary files /dev/null and b/test/fixtures/fuzz/sigsegv-2.fuzz differ diff --git a/test/fixtures/ping_status_1.anon.wbxml b/test/fixtures/ping_status_1.anon.wbxml new file mode 100644 index 0000000..06df658 Binary files /dev/null and b/test/fixtures/ping_status_1.anon.wbxml differ diff --git a/test/fixtures/ping_status_1.anon.wbxml.xml b/test/fixtures/ping_status_1.anon.wbxml.xml new file mode 100644 index 0000000..27fc9f0 --- /dev/null +++ b/test/fixtures/ping_status_1.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +1 + diff --git a/test/fixtures/ping_status_1.nostrtbl.wbxml b/test/fixtures/ping_status_1.nostrtbl.wbxml new file mode 100644 index 0000000..0cbceb0 Binary files /dev/null and b/test/fixtures/ping_status_1.nostrtbl.wbxml differ diff --git a/test/fixtures/ping_status_1.wbxml b/test/fixtures/ping_status_1.wbxml new file mode 100644 index 0000000..0cbceb0 Binary files /dev/null and b/test/fixtures/ping_status_1.wbxml differ diff --git a/test/fixtures/ping_status_1.wbxml.canonical.xml b/test/fixtures/ping_status_1.wbxml.canonical.xml new file mode 100644 index 0000000..4c4030a --- /dev/null +++ b/test/fixtures/ping_status_1.wbxml.canonical.xml @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/test/fixtures/ping_status_1.wbxml.compact.xml b/test/fixtures/ping_status_1.wbxml.compact.xml new file mode 100644 index 0000000..4c4030a --- /dev/null +++ b/test/fixtures/ping_status_1.wbxml.compact.xml @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/test/fixtures/ping_status_1.wbxml.indent2.xml b/test/fixtures/ping_status_1.wbxml.indent2.xml new file mode 100644 index 0000000..84de5f9 --- /dev/null +++ b/test/fixtures/ping_status_1.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + 1 + diff --git a/test/fixtures/ping_status_1.wbxml.xml b/test/fixtures/ping_status_1.wbxml.xml new file mode 100644 index 0000000..27fc9f0 --- /dev/null +++ b/test/fixtures/ping_status_1.wbxml.xml @@ -0,0 +1,5 @@ + + + +1 + diff --git a/test/fixtures/sync_initial_no_events.anon.wbxml b/test/fixtures/sync_initial_no_events.anon.wbxml new file mode 100644 index 0000000..57a687f Binary files /dev/null and b/test/fixtures/sync_initial_no_events.anon.wbxml differ diff --git a/test/fixtures/sync_initial_no_events.anon.wbxml.xml b/test/fixtures/sync_initial_no_events.anon.wbxml.xml new file mode 100644 index 0000000..eb389b1 --- /dev/null +++ b/test/fixtures/sync_initial_no_events.anon.wbxml.xml @@ -0,0 +1,11 @@ + + + + + +207270894 +1 +1 + + + diff --git a/test/fixtures/sync_initial_no_events.nostrtbl.wbxml b/test/fixtures/sync_initial_no_events.nostrtbl.wbxml new file mode 100644 index 0000000..533fb33 Binary files /dev/null and b/test/fixtures/sync_initial_no_events.nostrtbl.wbxml differ diff --git a/test/fixtures/sync_initial_no_events.wbxml b/test/fixtures/sync_initial_no_events.wbxml new file mode 100644 index 0000000..533fb33 Binary files /dev/null and b/test/fixtures/sync_initial_no_events.wbxml differ diff --git a/test/fixtures/sync_initial_no_events.wbxml.canonical.xml b/test/fixtures/sync_initial_no_events.wbxml.canonical.xml new file mode 100644 index 0000000..3a24d06 --- /dev/null +++ b/test/fixtures/sync_initial_no_events.wbxml.canonical.xml @@ -0,0 +1 @@ +20727089411 \ No newline at end of file diff --git a/test/fixtures/sync_initial_no_events.wbxml.compact.xml b/test/fixtures/sync_initial_no_events.wbxml.compact.xml new file mode 100644 index 0000000..3a24d06 --- /dev/null +++ b/test/fixtures/sync_initial_no_events.wbxml.compact.xml @@ -0,0 +1 @@ +20727089411 \ No newline at end of file diff --git a/test/fixtures/sync_initial_no_events.wbxml.indent2.xml b/test/fixtures/sync_initial_no_events.wbxml.indent2.xml new file mode 100644 index 0000000..9d7082c --- /dev/null +++ b/test/fixtures/sync_initial_no_events.wbxml.indent2.xml @@ -0,0 +1,11 @@ + + + + + + 207270894 + 1 + 1 + + + diff --git a/test/fixtures/sync_initial_no_events.wbxml.xml b/test/fixtures/sync_initial_no_events.wbxml.xml new file mode 100644 index 0000000..eb389b1 --- /dev/null +++ b/test/fixtures/sync_initial_no_events.wbxml.xml @@ -0,0 +1,11 @@ + + + + + +207270894 +1 +1 + + + diff --git a/test/fixtures/tables_counts.exs b/test/fixtures/tables_counts.exs new file mode 100644 index 0000000..514399e --- /dev/null +++ b/test/fixtures/tables_counts.exs @@ -0,0 +1,34 @@ +# Generated from libwbxml 0.11.10 (commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) +# wbxml_tables.c. Do not edit. The generator was removed after the port; if the +# tables ever need regenerating, re-dump that file's tables in this format. +%{ + wml10: %{tags: 36, namespaces: 0, attrs: 85, attr_values: 27, ext_values: 0}, + wml11: %{tags: 36, namespaces: 0, attrs: 85, attr_values: 27, ext_values: 0}, + wml12: %{tags: 36, namespaces: 0, attrs: 85, attr_values: 27, ext_values: 0}, + wml13: %{tags: 36, namespaces: 0, attrs: 85, attr_values: 27, ext_values: 0}, + wta10: %{tags: 5, namespaces: 0, attrs: 2, attr_values: 0, ext_values: 0}, + wtawml12: %{tags: 37, namespaces: 0, attrs: 111, attr_values: 27, ext_values: 0}, + channel11: %{tags: 4, namespaces: 0, attrs: 15, attr_values: 0, ext_values: 0}, + channel12: %{tags: 4, namespaces: 0, attrs: 18, attr_values: 0, ext_values: 0}, + si10: %{tags: 4, namespaces: 0, attrs: 14, attr_values: 4, ext_values: 0}, + sl10: %{tags: 1, namespaces: 0, attrs: 8, attr_values: 4, ext_values: 0}, + co10: %{tags: 3, namespaces: 0, attrs: 5, attr_values: 4, ext_values: 0}, + prov10: %{tags: 5, namespaces: 0, attrs: 110, attr_values: 67, ext_values: 0}, + emn10: %{tags: 1, namespaces: 0, attrs: 9, attr_values: 4, ext_values: 0}, + drmrel10: %{tags: 19, namespaces: 0, attrs: 3, attr_values: 3, ext_values: 0}, + ota_settings: %{tags: 3, namespaces: 0, attrs: 54, attr_values: 0, ext_values: 0}, + syncml12: %{tags: 74, namespaces: 2, attrs: 0, attr_values: 0, ext_values: 0}, + devinf12: %{tags: 47, namespaces: 1, attrs: 0, attr_values: 0, ext_values: 0}, + metinf12: %{tags: 18, namespaces: 0, attrs: 0, attr_values: 0, ext_values: 0}, + dmddf12: %{tags: 56, namespaces: 1, attrs: 0, attr_values: 0, ext_values: 0}, + syncml11: %{tags: 66, namespaces: 2, attrs: 0, attr_values: 0, ext_values: 0}, + devinf11: %{tags: 38, namespaces: 1, attrs: 0, attr_values: 0, ext_values: 0}, + metinf11: %{tags: 17, namespaces: 0, attrs: 0, attr_values: 0, ext_values: 0}, + syncml10: %{tags: 66, namespaces: 2, attrs: 0, attr_values: 0, ext_values: 0}, + devinf10: %{tags: 38, namespaces: 1, attrs: 0, attr_values: 0, ext_values: 0}, + wv_csp11: %{tags: 350, namespaces: 0, attrs: 6, attr_values: 0, ext_values: 105}, + wv_csp12: %{tags: 350, namespaces: 0, attrs: 6, attr_values: 0, ext_values: 105}, + airsync: %{tags: 645, namespaces: 26, attrs: 1, attr_values: 0, ext_values: 0}, + activesync: %{tags: 645, namespaces: 26, attrs: 1, attr_values: 0, ext_values: 0}, + conml: %{tags: 56, namespaces: 0, attrs: 0, attr_values: 0, ext_values: 0} +} diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.anon.wbxml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.anon.wbxml new file mode 100644 index 0000000..4f27440 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.anon.wbxml.xml new file mode 100644 index 0000000..d8f3576 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.anon.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.nostrtbl.wbxml new file mode 100644 index 0000000..2794c25 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml new file mode 100644 index 0000000..2794c25 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.canonical.xml new file mode 100644 index 0000000..d5bbd29 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.canonical.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.compact.xml new file mode 100644 index 0000000..d5bbd29 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.compact.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.indent2.xml new file mode 100644 index 0000000..b8c7fcd --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.indent2.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.xml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.xml new file mode 100644 index 0000000..d8f3576 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-001-settings_device_information.xml b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.xml new file mode 100644 index 0000000..e7010f6 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-001-settings_device_information.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.anon.wbxml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.anon.wbxml new file mode 100644 index 0000000..2fe5fbc Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.anon.wbxml.xml new file mode 100644 index 0000000..ea737de --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.anon.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.nostrtbl.wbxml new file mode 100644 index 0000000..7c32a72 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml new file mode 100644 index 0000000..7c32a72 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.canonical.xml new file mode 100644 index 0000000..6e60949 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.canonical.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.compact.xml new file mode 100644 index 0000000..6e60949 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.compact.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.indent2.xml new file mode 100644 index 0000000..10b6e30 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.indent2.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.xml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.xml new file mode 100644 index 0000000..ea737de --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-002-settings_user_information.xml b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.xml new file mode 100644 index 0000000..4fca236 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-002-settings_user_information.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.anon.wbxml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.anon.wbxml new file mode 100644 index 0000000..14d27f1 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.anon.wbxml.xml new file mode 100644 index 0000000..a0b0675 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.anon.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.nostrtbl.wbxml new file mode 100644 index 0000000..ccf3523 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml new file mode 100644 index 0000000..ccf3523 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.canonical.xml new file mode 100644 index 0000000..2088420 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.canonical.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.compact.xml new file mode 100644 index 0000000..2088420 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.compact.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.indent2.xml new file mode 100644 index 0000000..c7216e4 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.indent2.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.xml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.xml new file mode 100644 index 0000000..a0b0675 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-003-settings_device_password.xml b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.xml new file mode 100644 index 0000000..7e73bae --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-003-settings_device_password.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.anon.wbxml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.anon.wbxml new file mode 100644 index 0000000..b833614 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-004-settings_oof.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.anon.wbxml.xml new file mode 100644 index 0000000..c16d6a6 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-004-settings_oof.anon.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.nostrtbl.wbxml new file mode 100644 index 0000000..6df2e9b Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-004-settings_oof.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml new file mode 100644 index 0000000..6df2e9b Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.canonical.xml new file mode 100644 index 0000000..290ecf7 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.canonical.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.compact.xml new file mode 100644 index 0000000..290ecf7 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.compact.xml @@ -0,0 +1 @@ +0.11-beta1234567890Test DeviceLinuxde_DE+49301234567890O2libwbxml \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.indent2.xml new file mode 100644 index 0000000..06aee29 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.indent2.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.xml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.xml new file mode 100644 index 0000000..c16d6a6 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-004-settings_oof.wbxml.xml @@ -0,0 +1,16 @@ + + + + + +0.11-beta +1234567890 +Test Device +Linux +de_DE ++49301234567890 +O2 +libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-004-settings_oof.xml b/test/fixtures/upstream/activesync/activesync-004-settings_oof.xml new file mode 100644 index 0000000..493aca3 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-004-settings_oof.xml @@ -0,0 +1,16 @@ + + + + + + 0.11-beta + 1234567890 + Test Device + Linux + de_DE + +49301234567890 + O2 + libwbxml + + + diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.anon.wbxml b/test/fixtures/upstream/activesync/activesync-005-settings_status.anon.wbxml new file mode 100644 index 0000000..fc9e3ac Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-005-settings_status.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-005-settings_status.anon.wbxml.xml new file mode 100644 index 0000000..aa69e79 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-005-settings_status.anon.wbxml.xml @@ -0,0 +1,10 @@ + + + +1 + + +1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-005-settings_status.nostrtbl.wbxml new file mode 100644 index 0000000..b864cac Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-005-settings_status.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml new file mode 100644 index 0000000..b864cac Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.canonical.xml new file mode 100644 index 0000000..28a0c89 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.canonical.xml @@ -0,0 +1 @@ +11 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.compact.xml new file mode 100644 index 0000000..28a0c89 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.compact.xml @@ -0,0 +1 @@ +11 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.indent2.xml new file mode 100644 index 0000000..a0ef6b1 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.indent2.xml @@ -0,0 +1,10 @@ + + + + 1 + + + 1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.xml b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.xml new file mode 100644 index 0000000..aa69e79 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-005-settings_status.wbxml.xml @@ -0,0 +1,10 @@ + + + +1 + + +1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-005-settings_status.xml b/test/fixtures/upstream/activesync/activesync-005-settings_status.xml new file mode 100644 index 0000000..1aa6546 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-005-settings_status.xml @@ -0,0 +1,10 @@ + + + + 1 + + + 1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.anon.wbxml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.anon.wbxml new file mode 100644 index 0000000..cb66c5f Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-010-provision-eas.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.anon.wbxml.xml new file mode 100644 index 0000000..ef3f0c8 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-010-provision-eas.anon.wbxml.xml @@ -0,0 +1,9 @@ + + + + + +MS-EAS-Provisioning-WBXML + + + diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.nostrtbl.wbxml new file mode 100644 index 0000000..001bfb2 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-010-provision-eas.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml new file mode 100644 index 0000000..001bfb2 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.canonical.xml new file mode 100644 index 0000000..63a238b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.canonical.xml @@ -0,0 +1 @@ +MS-EAS-Provisioning-WBXML \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.compact.xml new file mode 100644 index 0000000..63a238b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.compact.xml @@ -0,0 +1 @@ +MS-EAS-Provisioning-WBXML \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.indent2.xml new file mode 100644 index 0000000..c6f74aa --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.indent2.xml @@ -0,0 +1,9 @@ + + + + + + MS-EAS-Provisioning-WBXML + + + diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.xml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.xml new file mode 100644 index 0000000..ef3f0c8 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-010-provision-eas.wbxml.xml @@ -0,0 +1,9 @@ + + + + + +MS-EAS-Provisioning-WBXML + + + diff --git a/test/fixtures/upstream/activesync/activesync-010-provision-eas.xml b/test/fixtures/upstream/activesync/activesync-010-provision-eas.xml new file mode 100644 index 0000000..814cc25 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-010-provision-eas.xml @@ -0,0 +1,9 @@ + + + + + + MS-EAS-Provisioning-WBXML + + + diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.anon.wbxml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.anon.wbxml new file mode 100644 index 0000000..b2ec9ec Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-011-provision-wap.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.anon.wbxml.xml new file mode 100644 index 0000000..6562f6f --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-011-provision-wap.anon.wbxml.xml @@ -0,0 +1,9 @@ + + + + + +MS-WAP-Provisioning-XML + + + diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.nostrtbl.wbxml new file mode 100644 index 0000000..45f2028 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-011-provision-wap.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml new file mode 100644 index 0000000..45f2028 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.canonical.xml new file mode 100644 index 0000000..7d18d9d --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.canonical.xml @@ -0,0 +1 @@ +MS-WAP-Provisioning-XML \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.compact.xml new file mode 100644 index 0000000..7d18d9d --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.compact.xml @@ -0,0 +1 @@ +MS-WAP-Provisioning-XML \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.indent2.xml new file mode 100644 index 0000000..4b19250 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.indent2.xml @@ -0,0 +1,9 @@ + + + + + + MS-WAP-Provisioning-XML + + + diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.xml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.xml new file mode 100644 index 0000000..6562f6f --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-011-provision-wap.wbxml.xml @@ -0,0 +1,9 @@ + + + + + +MS-WAP-Provisioning-XML + + + diff --git a/test/fixtures/upstream/activesync/activesync-011-provision-wap.xml b/test/fixtures/upstream/activesync/activesync-011-provision-wap.xml new file mode 100644 index 0000000..2779f43 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-011-provision-wap.xml @@ -0,0 +1,9 @@ + + + + + + MS-WAP-Provisioning-XML + + + diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.anon.wbxml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.anon.wbxml new file mode 100644 index 0000000..7647f08 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-012-provision-eas.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.anon.wbxml.xml new file mode 100644 index 0000000..63514d7 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-012-provision-eas.anon.wbxml.xml @@ -0,0 +1,61 @@ + + + + +1 + +1 + + +MS-EAS-Provisioning-WBXML +1 +1686474474 + + +0 +0 +0 +0 +1 + + + + +1 + +0 +1 +1 +0 +1 +1 +1 +1 +1 +1 +2 +1 +0 +1 +0 +1 +0 +-1 +-1 +0 +0 +0 +0 +2 +1 +1 +1 +1 +1 + + + + + + + diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.nostrtbl.wbxml new file mode 100644 index 0000000..9ffa12b Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-012-provision-eas.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml new file mode 100644 index 0000000..9ffa12b Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.canonical.xml new file mode 100644 index 0000000..ece99a0 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.canonical.xml @@ -0,0 +1 @@ +11MS-EAS-Provisioning-WBXML1168647447400001101101111112101010-1-10000211111 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.compact.xml new file mode 100644 index 0000000..ece99a0 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.compact.xml @@ -0,0 +1 @@ +11MS-EAS-Provisioning-WBXML1168647447400001101101111112101010-1-10000211111 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.indent2.xml new file mode 100644 index 0000000..d8f8513 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.indent2.xml @@ -0,0 +1,61 @@ + + + + + 1 + + 1 + + + MS-EAS-Provisioning-WBXML + 1 + 1686474474 + + + 0 + 0 + 0 + 0 + 1 + + + + + 1 + + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 0 + 1 + 0 + 1 + 0 + -1 + -1 + 0 + 0 + 0 + 0 + 2 + 1 + 1 + 1 + 1 + 1 + + + + + + + diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.xml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.xml new file mode 100644 index 0000000..63514d7 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-012-provision-eas.wbxml.xml @@ -0,0 +1,61 @@ + + + + +1 + +1 + + +MS-EAS-Provisioning-WBXML +1 +1686474474 + + +0 +0 +0 +0 +1 + + + + +1 + +0 +1 +1 +0 +1 +1 +1 +1 +1 +1 +2 +1 +0 +1 +0 +1 +0 +-1 +-1 +0 +0 +0 +0 +2 +1 +1 +1 +1 +1 + + + + + + + diff --git a/test/fixtures/upstream/activesync/activesync-012-provision-eas.xml b/test/fixtures/upstream/activesync/activesync-012-provision-eas.xml new file mode 100644 index 0000000..e507a64 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-012-provision-eas.xml @@ -0,0 +1,63 @@ + + + + + 1 + + 1 + + + MS-EAS-Provisioning-WBXML + 1 + 1686474474 + + + 0 + 0 + 0 + + + 0 + 1 + + + + + 1 + + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 0 + 1 + 0 + 1 + 0 + -1 + -1 + 0 + 0 + 0 + 0 + 2 + 1 + 1 + 1 + 1 + 1 + + + + + + + diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.anon.wbxml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.anon.wbxml new file mode 100644 index 0000000..6fa7841 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.anon.wbxml.xml new file mode 100644 index 0000000..2052eb9 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +0 + diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.nostrtbl.wbxml new file mode 100644 index 0000000..6a02606 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml new file mode 100644 index 0000000..6a02606 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.canonical.xml new file mode 100644 index 0000000..8263611 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.canonical.xml @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.compact.xml new file mode 100644 index 0000000..8263611 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.compact.xml @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.indent2.xml new file mode 100644 index 0000000..4ca8433 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + 0 + diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.xml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.xml new file mode 100644 index 0000000..2052eb9 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.wbxml.xml @@ -0,0 +1,5 @@ + + + +0 + diff --git a/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.xml b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.xml new file mode 100644 index 0000000..a0faf96 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.xml @@ -0,0 +1,6 @@ + + + + 0 + + diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.anon.wbxml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.anon.wbxml new file mode 100644 index 0000000..f8184a5 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.anon.wbxml.xml new file mode 100644 index 0000000..fd37acd --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.anon.wbxml.xml @@ -0,0 +1,39 @@ + + + +1 +1 + +5 + +1 +0 +Calendar +8 + + +2 +0 +Contacts +9 + + +3 +0 +INBOX +5 + + +12 +3 +Family +12 + + +RI +0 +RecipientInfo +19 + + + diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.nostrtbl.wbxml new file mode 100644 index 0000000..74102eb Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml new file mode 100644 index 0000000..74102eb Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.canonical.xml new file mode 100644 index 0000000..23730a8 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.canonical.xml @@ -0,0 +1 @@ +11510Calendar820Contacts930INBOX5123Family12RI0RecipientInfo19 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.compact.xml new file mode 100644 index 0000000..23730a8 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.compact.xml @@ -0,0 +1 @@ +11510Calendar820Contacts930INBOX5123Family12RI0RecipientInfo19 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.indent2.xml new file mode 100644 index 0000000..19aba49 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.indent2.xml @@ -0,0 +1,39 @@ + + + + 1 + 1 + + 5 + + 1 + 0 + Calendar + 8 + + + 2 + 0 + Contacts + 9 + + + 3 + 0 + INBOX + 5 + + + 12 + 3 + Family + 12 + + + RI + 0 + RecipientInfo + 19 + + + diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.xml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.xml new file mode 100644 index 0000000..fd37acd --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.wbxml.xml @@ -0,0 +1,39 @@ + + + +1 +1 + +5 + +1 +0 +Calendar +8 + + +2 +0 +Contacts +9 + + +3 +0 +INBOX +5 + + +12 +3 +Family +12 + + +RI +0 +RecipientInfo +19 + + + diff --git a/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.xml b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.xml new file mode 100644 index 0000000..2c9146b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.xml @@ -0,0 +1,40 @@ + + + + 1 + 1 + + 5 + + 1 + 0 + Calendar + 8 + + + 2 + 0 + Contacts + 9 + + + 3 + 0 + INBOX + 5 + + + 12 + 3 + Family + + 12 + + + RI + 0 + RecipientInfo + 19 + + + diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.anon.wbxml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.anon.wbxml new file mode 100644 index 0000000..09c9adc Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.anon.wbxml.xml new file mode 100644 index 0000000..d1e94b2 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.anon.wbxml.xml @@ -0,0 +1,7 @@ + + + +1 + +RnJvbTogZmFrZXVzZXJAZXhhbXBsZS5jb20KVG86IGZha2V1c2VyQGV4YW1wbGUuY29tCkNjOgpCY2M6ClN1YmplY3Q6IEZyb20gTlN5bmMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSZxdW90O2lzby04ODU5LTEmcXVvdDsKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogN2JpdApYLU1pbWVPTEU6IFByb2R1Y2VkIEJ5IE1pY3Jvc29mdCBNaW1lT0xFIFY2LjAwLjI5MDAuMzM1MApUaGlzIGlzIHRoZSBib2R5IHRleHQuCg== + diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.nostrtbl.wbxml new file mode 100644 index 0000000..9bd615e Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml new file mode 100644 index 0000000..76117ac Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.canonical.xml new file mode 100644 index 0000000..c7ee53d --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.canonical.xml @@ -0,0 +1 @@ +1RnJvbTogZmFrZXVzZXJAZXhhbXBsZS5jb20KVG86IGZha2V1c2VyQGV4YW1wbGUuY29tCkNjOgpCY2M6ClN1YmplY3Q6IEZyb20gTlN5bmMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSZxdW90O2lzby04ODU5LTEmcXVvdDsKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogN2JpdApYLU1pbWVPTEU6IFByb2R1Y2VkIEJ5IE1pY3Jvc29mdCBNaW1lT0xFIFY2LjAwLjI5MDAuMzM1MApUaGlzIGlzIHRoZSBib2R5IHRleHQuCg== \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.compact.xml new file mode 100644 index 0000000..c7ee53d --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.compact.xml @@ -0,0 +1 @@ +1RnJvbTogZmFrZXVzZXJAZXhhbXBsZS5jb20KVG86IGZha2V1c2VyQGV4YW1wbGUuY29tCkNjOgpCY2M6ClN1YmplY3Q6IEZyb20gTlN5bmMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSZxdW90O2lzby04ODU5LTEmcXVvdDsKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogN2JpdApYLU1pbWVPTEU6IFByb2R1Y2VkIEJ5IE1pY3Jvc29mdCBNaW1lT0xFIFY2LjAwLjI5MDAuMzM1MApUaGlzIGlzIHRoZSBib2R5IHRleHQuCg== \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.indent2.xml new file mode 100644 index 0000000..fd2bb62 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.indent2.xml @@ -0,0 +1,7 @@ + + + + 1 + + RnJvbTogZmFrZXVzZXJAZXhhbXBsZS5jb20KVG86IGZha2V1c2VyQGV4YW1wbGUuY29tCkNjOgpCY2M6ClN1YmplY3Q6IEZyb20gTlN5bmMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSZxdW90O2lzby04ODU5LTEmcXVvdDsKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogN2JpdApYLU1pbWVPTEU6IFByb2R1Y2VkIEJ5IE1pY3Jvc29mdCBNaW1lT0xFIFY2LjAwLjI5MDAuMzM1MApUaGlzIGlzIHRoZSBib2R5IHRleHQuCg== + diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.xml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.xml new file mode 100644 index 0000000..d1e94b2 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.wbxml.xml @@ -0,0 +1,7 @@ + + + +1 + +RnJvbTogZmFrZXVzZXJAZXhhbXBsZS5jb20KVG86IGZha2V1c2VyQGV4YW1wbGUuY29tCkNjOgpCY2M6ClN1YmplY3Q6IEZyb20gTlN5bmMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSZxdW90O2lzby04ODU5LTEmcXVvdDsKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogN2JpdApYLU1pbWVPTEU6IFByb2R1Y2VkIEJ5IE1pY3Jvc29mdCBNaW1lT0xFIFY2LjAwLjI5MDAuMzM1MApUaGlzIGlzIHRoZSBib2R5IHRleHQuCg== + diff --git a/test/fixtures/upstream/activesync/activesync-030-sendmail-request.xml b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.xml new file mode 100644 index 0000000..af39269 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-030-sendmail-request.xml @@ -0,0 +1,7 @@ + + + + 1 + + RnJvbTogZmFrZXVzZXJAZXhhbXBsZS5jb20KVG86IGZha2V1c2VyQGV4YW1wbGUuY29tCkNjOgpCY2M6ClN1YmplY3Q6IEZyb20gTlN5bmMKTUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSZxdW90O2lzby04ODU5LTEmcXVvdDsKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogN2JpdApYLU1pbWVPTEU6IFByb2R1Y2VkIEJ5IE1pY3Jvc29mdCBNaW1lT0xFIFY2LjAwLjI5MDAuMzM1MApUaGlzIGlzIHRoZSBib2R5IHRleHQuCg== + diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.anon.wbxml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.anon.wbxml new file mode 100644 index 0000000..d00db07 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.anon.wbxml.xml new file mode 100644 index 0000000..bca9e07 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.anon.wbxml.xml @@ -0,0 +1,7 @@ + + + +1 + +RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.nostrtbl.wbxml new file mode 100644 index 0000000..fd7ae6e Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml new file mode 100644 index 0000000..fd7ae6e Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.canonical.xml new file mode 100644 index 0000000..b99201b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.canonical.xml @@ -0,0 +1 @@ +1RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.compact.xml new file mode 100644 index 0000000..b99201b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.compact.xml @@ -0,0 +1 @@ +1RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.indent2.xml new file mode 100644 index 0000000..f9b64c5 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.indent2.xml @@ -0,0 +1,7 @@ + + + + 1 + + RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.xml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.xml new file mode 100644 index 0000000..bca9e07 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.wbxml.xml @@ -0,0 +1,7 @@ + + + +1 + +RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-031-sendmail-request.xml b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.xml new file mode 100644 index 0000000..42d1dd9 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-031-sendmail-request.xml @@ -0,0 +1,7 @@ + + + + 1 + + RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.anon.wbxml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.anon.wbxml new file mode 100644 index 0000000..d00db07 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.anon.wbxml.xml new file mode 100644 index 0000000..bca9e07 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.anon.wbxml.xml @@ -0,0 +1,7 @@ + + + +1 + +RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.nostrtbl.wbxml new file mode 100644 index 0000000..fd7ae6e Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml new file mode 100644 index 0000000..fd7ae6e Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.canonical.xml new file mode 100644 index 0000000..b99201b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.canonical.xml @@ -0,0 +1 @@ +1RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.compact.xml new file mode 100644 index 0000000..b99201b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.compact.xml @@ -0,0 +1 @@ +1RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.indent2.xml new file mode 100644 index 0000000..f9b64c5 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.indent2.xml @@ -0,0 +1,7 @@ + + + + 1 + + RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.xml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.xml new file mode 100644 index 0000000..bca9e07 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.wbxml.xml @@ -0,0 +1,7 @@ + + + +1 + +RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGUuY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLjAKCnRlc3QgYm9keQo= + diff --git a/test/fixtures/upstream/activesync/activesync-032-formatted-base64.xml b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.xml new file mode 100644 index 0000000..668d8fc --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-032-formatted-base64.xml @@ -0,0 +1,11 @@ + + + + 1 + + + RnJvbTogPGphbmUuZG9lQGV4YW1wbGUuY29tPgpUbzogPGpvaG4uZG9lQGV4YW1wbGU + uY29tPgpTdWJqZWN0OiBUZXN0IGVtYWlsIHN1YmplY3QKTUlNRS1WZXJzaW9uOiAxLj + AKCnRlc3QgYm9keQo= + + diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.anon.wbxml b/test/fixtures/upstream/activesync/activesync-040-search-response.anon.wbxml new file mode 100644 index 0000000..6cd1fd7 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-040-search-response.anon.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.anon.wbxml.xml b/test/fixtures/upstream/activesync/activesync-040-search-response.anon.wbxml.xml new file mode 100644 index 0000000..079d152 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-040-search-response.anon.wbxml.xml @@ -0,0 +1,26 @@ + + + +1 + + +1 + + +xxx yyy +xxx +yyy +tfu@aon.at ++0 (999) 99999 +++0 (999) 99999 + +1 +/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgASABgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9htgcEdTWjboygbRUltCoI2p+lX/ALLKVyqYHrX6aj80WHkVVD/xHA96PNUPgAs1cV+0P4T+KN58ILuf4Zabc3evTzrF9ot5oYvs8IBMjgykDPAUYwRuyOleG/sjfD34seNNM1JviNqOq2+k2120I/tG9nlurvCjdGAX8vygerMrlslRjBI8OWa05V5YWjBymna221rtX3irpNq+uiuerHJ6joqvUkoxfz72WnV20T/A+q7KeO9mdI54pGjba6I4JQ+hHar8ieUQc5qXR/Bmn6Lam20+zjtIiu0+UNrEdst147c8V5f8Wta8c/BnS5Nf0yzt/GvheFwb2C9kMN5p0ZODKJFUiWJe+5d6gZLMMkevKfs4801621OGOFcnaP4noksQuWAGfwqRNGwhbado6mvm/wCDP7eHhX4ifExfB2rWEWhteSGLTdTS58yCaTtG+VGwt0U8gkgccZ+sm8FLrt7bxC0Sa6LYjcLh1Ps3UcZ/Cs1ioTpylSknbu7ffo7fcarASjJe1T17I4ifW9Eh1yPRJdTsl1mSMypp7XCCdkHVgmd2PfFSyWMjMdgAU9K838Z/Df4efAD4g+MfGXiTU9Vk8RzWa3EFs0yxwCB8oQioFZ23QtyT0K9SSab+x946T4k/Ca5uhLJPHYavdWURlZmdY/llRWLEk4WUDkngAdq8fJ83nmqdeMUqTS5Xd3b1UtHFWS6PRvW8Ud+My2nhlGCk3PW6srJaW1Ter7bebO9m03AIcZzWVc6IkhPyg/WvQH0+B87jt+tVLm1s0QkOuRX0nOjy3hLrU6q00exViixDcO+K6C20C2nQAKoB9q5Cyv7p3LhSM9Tit2XUTp9k9zcXKwRRI0kjscKigZJP0ArzpKT6n0MVHsSeHdeiuvFfjDwxJufT9Et7WZoQdvmNcKxUH1H7uQn3K+lR+HtHsIPPhjijtI5ZDIqJwNx6/wAv0r5s/ZB+OMnxb1f4teKXjKw6nqFrHbBufLhiSRUT6hSCe2W4Ar2nxdo154v+HfiWx0y+NhqkljK9ldoxBguUG+FwV5GHVTxzxXxEcsg8zebT+OPuxf8Ada1XzbbPY+syeF+rR+F6teaPTbXwvbFWPm8U2TRtPWGZZNjREEOHwQR3BHevjrw1+1Hrvw5FrY+OfFOg+K0CYll06KSC+TA6sFDRNyMYPlnv9bEf7aeleM/BnjHU4bQ6dZ6csUFhmUtJPM6sxZiOMKApwP7y5619R7dyjzKTPKSjzcr0PjP9s/4QeA/h18WIZPADodNuXa4ns4wf9FnLEsi5/wCWY6rxx06AZ/X/APZk12Lxj8OfC/iG4kWe8k0mF5pQ2SZtoWQ/XIbP1r8G/FWuXviHxv59xcmSS4lBBZs4XPA+lffn7Fn7RlnY2dn4IbU5I7+2uZntvMICsrxxgxA9yCjnB/vflwfVW6Mo09L7/P8AT8ivrN68PadtPlt/XVl//grFdw614o+HM1nEIpcahYzzA/6xCInCt/ukEj/eb1qD/gmDd/a/AHjjwxOF83SNYS6GOpSeIAZ9eYDU3/BQHwdf+KPhlb+IrELLPoV39qmUnB8h1KOR9CUJ9ga8d/4JdfFWPR/jnregagcJ4i0orEF/intiXXj/AK5tOfwpZfQlgKSoyd2pO3oy6t61aU0vdaX3o/STVNCh2AIMtjqBWJNolnCjGZTk+tdVJrUdnPIRCWV+gINNe1iuUJkspJQ3OVXgV73PJbmfs4vodNbfDKR4fmuecDAUYryn9ojwVe2vw+k0G2dpdQ8T3cehWqISC/nBjKCR90eSk3zdutfQ1lfKr74w5X1PSuJ8Z3Ca98YPANo0fmw6ZDqGsuuMgSKkdtHn8LuUj/dPpXzf1rEXaex3ckLHyv8ACvwBp3wOi1rwxpgVLIahcMjqoXzGRzCWP/frH4V8/ftfftJeJbHUbf4VeBzcjVtXVBevYgm4kEhxHbx45Bbq2OoIHQmvqrx5pmoPocviWSDyLS91i/ltGxgmB5jImfxd/wAjXlXhrwL4U0/4tr8RXtzN4nlgFqksr7li+TYWRT0Yr8pPp9Tnd1b0UktTJRtKz2LH7PH/AATRnvNBGsfFDxDfRX2oQcaZoEsSxwRuvKyO8b72wedoABzy3Wvlv9sbw5oXwR8b6r8PfBy3EWiaaysDcsrSvI6BnLMqjcQTgE84UZJr9o9Chl0/SrG2fJMUCRkdeQoBr8O/27vEqar+0B47eMqyjVLiJSDnhXKfrtrKjOU5tvsZVqcYxjGK3Z80RXch1SOfdlt4AruJPC3iTw3Hpmq20ciPfxvqFt5BPmBE+YsAOeF+fIzgcnGK5LwfpD+IPEml6ahKvdXUcKnHdmCj+dfuB4O/ZA8H+PPhD4IuNW017bXNGSe80q6t5TE8YliEaxv2eMokRKn04Iyc6OpKlTVRd/0NJU1UnyW6H5sav+13qHjv9nzxH4P8SuZddMUMVrf97mPzU3K/+2Fyd38QznkZPjv7Mfi1Ph9+0D8O9buLg2tnDrMCXc+ceXBI3lSn8I3euv8A2l/g6vw81641HSrZ4NJmmMdzbgcWk2TwB2U9h2Ix3Arw1IC+ntcMMLv2q3qQBn+Y/OtKlR1rPqhU/cXkf0e3vw2iifzHnkkA6AVf0awngUxfZzs6Ams39nfxdJ4/+Afw68QXc/nXeo+H7C5uHPO6YwJ5n/j+6u8luFi5A6V5rxVWS5Z6nb7OK1R4fZftG+FmXBku1+sJxWNN8YvDyeML3XIXuJDNpkVkiiLBi2ySuzf8C3x/98V8yW92+zOfbpT9S1KVdHvvKnhtpRA5Wa4cJGnyn5mY9AOpPoKzU7sFY2vjT8ZksdG0nQyxFtZ2UEK2gbPzKqknPqSDk1z/AOztqWneIPHtvq/iFJzpNgTOtvF8wkkH3A3+zk5I74+tfOfiLxfc/EHxH4z1DSbi1vtB8M24mub3zcCTG7KR8Yb5Uc9ecYHUV778Fp7W38BWWpWpNxFfILgPChbKdAOOT34/Cu2tKPLZPbQ8+nzzrXktNz7jh+Oug3JjRFuElZwgBj9T1r8Lv2g9bXX/AB54h1bySi6jqdzOm484MpOP/r1+mlrqmZN6s3y/NypB49sV+cPxe0m3nsfC+maesuoaze2pmMEK7m8yaZ2WMADJPI/MVOG97mtpoa4nSUPUo/sp+Dz4y+KWnEsEh08/bJDnBypAjA9zIyfrX7gWvxz8O2NskEcV1FFAixxRhP4QMDv6CvyD/Ym8MS6R8SdWm1BGtDp9tsnjuF2Mkpk4BzyCCp/Kvte78TWb2k7Wl5C0ygnLtuAPfgcn6CqxFRKEIPda/f8A8MVRSc5zv/SKP7VXgrQvF9/qWs6DB/aOlakjPq2mToVKHGXlj9f72Oqnke35yar4Cm8G+B/GGnarFveC6tpdOuUYfvMM6OcdcFXXI9QOvWv0Jj8cQJdJ52oWkqhQHSGB2w3X34IPQj+tfFf7SzR2HiXV9LSSW3sUhS608SZVZI2cboyDyDG3yjPJG09KnDVY81pdmvwMsRGSs6e11f7z7/8A+Ccf7TmkSfstaNoutTyQ3vh26n0xSqFvMj3CWM8DsswX/gFfSFx+0f4RVsG6mPqfKP8AhX5XfsrWesfDa78T6Dr8FxZxTtb3doDbSCOXIcOyHb6BAR6ivYda+JWg6ZCZbvUFtwy71SVShYHp94Ac/wBK5pSUZaK51cytqbNvqHHzSgc1LeypfWFxbSKGWaNom3EEYII6Hr/KiiuNtjieDy/CHx1omg654b8PXWg/2FrKN9pNynkzlyoUspijABwB1BGR05Odz4caD8Vfhn4fsNA0y68OXOjWmSi3hlkkClizLvUR8ZY4yCRkDJ4ooqVUaZTj2Z195rPxLN9JeRwWkkkkSxLaQ3ixwIOcudyFiecdTnA4rx74bfCD4geANeuNZl07S9RvvsX2KBYdQeMxKFVSQCmMttyTnqxIx0JRR7VrZfmL2fRtlbwP8Ofi14M8b+INfi03S7mPVpJTJa398zxoWk35GOpHIBP9416pLP8AFaRAIING0wOG/wBUNzKSOPm6ZBwc7T054yCUU1Vvq1+f+YnTvs2vu/yM26h+MB85k1PTAJi2I3kkYLkYG3G08dfvfoMV5r4v+Bvj/wAfa3He65q+jtJGY87hLghDkAk72A5OcYz3zgUUU1Uv0RPI1s2dGPh349QxMupaGZl4MuyQswAx8xZemP07UWngDxIzxy3P/CNOWxl1tWZpBxwflAbp09hmiitlUfZfcczpJdX95//Z + + + +0-0 +1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.nostrtbl.wbxml b/test/fixtures/upstream/activesync/activesync-040-search-response.nostrtbl.wbxml new file mode 100644 index 0000000..19dae2b Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-040-search-response.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml new file mode 100644 index 0000000..9187371 Binary files /dev/null and b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml differ diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.canonical.xml b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.canonical.xml new file mode 100644 index 0000000..1d19ad7 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.canonical.xml @@ -0,0 +1 @@ +11xxx yyyxxxyyytfu@aon.at+0 (999) 99999++0 (999) 999991/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgASABgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9htgcEdTWjboygbRUltCoI2p+lX/ALLKVyqYHrX6aj80WHkVVD/xHA96PNUPgAs1cV+0P4T+KN58ILuf4Zabc3evTzrF9ot5oYvs8IBMjgykDPAUYwRuyOleG/sjfD34seNNM1JviNqOq2+k2120I/tG9nlurvCjdGAX8vygerMrlslRjBI8OWa05V5YWjBymna221rtX3irpNq+uiuerHJ6joqvUkoxfz72WnV20T/A+q7KeO9mdI54pGjba6I4JQ+hHar8ieUQc5qXR/Bmn6Lam20+zjtIiu0+UNrEdst147c8V5f8Wta8c/BnS5Nf0yzt/GvheFwb2C9kMN5p0ZODKJFUiWJe+5d6gZLMMkevKfs4801621OGOFcnaP4noksQuWAGfwqRNGwhbado6mvm/wCDP7eHhX4ifExfB2rWEWhteSGLTdTS58yCaTtG+VGwt0U8gkgccZ+sm8FLrt7bxC0Sa6LYjcLh1Ps3UcZ/Cs1ioTpylSknbu7ffo7fcarASjJe1T17I4ifW9Eh1yPRJdTsl1mSMypp7XCCdkHVgmd2PfFSyWMjMdgAU9K838Z/Df4efAD4g+MfGXiTU9Vk8RzWa3EFs0yxwCB8oQioFZ23QtyT0K9SSab+x946T4k/Ca5uhLJPHYavdWURlZmdY/llRWLEk4WUDkngAdq8fJ83nmqdeMUqTS5Xd3b1UtHFWS6PRvW8Ud+My2nhlGCk3PW6srJaW1Ter7bebO9m03AIcZzWVc6IkhPyg/WvQH0+B87jt+tVLm1s0QkOuRX0nOjy3hLrU6q00exViixDcO+K6C20C2nQAKoB9q5Cyv7p3LhSM9Tit2XUTp9k9zcXKwRRI0kjscKigZJP0ArzpKT6n0MVHsSeHdeiuvFfjDwxJufT9Et7WZoQdvmNcKxUH1H7uQn3K+lR+HtHsIPPhjijtI5ZDIqJwNx6/wAv0r5s/ZB+OMnxb1f4teKXjKw6nqFrHbBufLhiSRUT6hSCe2W4Ar2nxdo154v+HfiWx0y+NhqkljK9ldoxBguUG+FwV5GHVTxzxXxEcsg8zebT+OPuxf8Ada1XzbbPY+syeF+rR+F6teaPTbXwvbFWPm8U2TRtPWGZZNjREEOHwQR3BHevjrw1+1Hrvw5FrY+OfFOg+K0CYll06KSC+TA6sFDRNyMYPlnv9bEf7aeleM/BnjHU4bQ6dZ6csUFhmUtJPM6sxZiOMKApwP7y5619R7dyjzKTPKSjzcr0PjP9s/4QeA/h18WIZPADodNuXa4ns4wf9FnLEsi5/wCWY6rxx06AZ/X/APZk12Lxj8OfC/iG4kWe8k0mF5pQ2SZtoWQ/XIbP1r8G/FWuXviHxv59xcmSS4lBBZs4XPA+lffn7Fn7RlnY2dn4IbU5I7+2uZntvMICsrxxgxA9yCjnB/vflwfVW6Mo09L7/P8AT8ivrN68PadtPlt/XVl//grFdw614o+HM1nEIpcahYzzA/6xCInCt/ukEj/eb1qD/gmDd/a/AHjjwxOF83SNYS6GOpSeIAZ9eYDU3/BQHwdf+KPhlb+IrELLPoV39qmUnB8h1KOR9CUJ9ga8d/4JdfFWPR/jnregagcJ4i0orEF/intiXXj/AK5tOfwpZfQlgKSoyd2pO3oy6t61aU0vdaX3o/STVNCh2AIMtjqBWJNolnCjGZTk+tdVJrUdnPIRCWV+gINNe1iuUJkspJQ3OVXgV73PJbmfs4vodNbfDKR4fmuecDAUYryn9ojwVe2vw+k0G2dpdQ8T3cehWqISC/nBjKCR90eSk3zdutfQ1lfKr74w5X1PSuJ8Z3Ca98YPANo0fmw6ZDqGsuuMgSKkdtHn8LuUj/dPpXzf1rEXaex3ckLHyv8ACvwBp3wOi1rwxpgVLIahcMjqoXzGRzCWP/frH4V8/ftfftJeJbHUbf4VeBzcjVtXVBevYgm4kEhxHbx45Bbq2OoIHQmvqrx5pmoPocviWSDyLS91i/ltGxgmB5jImfxd/wAjXlXhrwL4U0/4tr8RXtzN4nlgFqksr7li+TYWRT0Yr8pPp9Tnd1b0UktTJRtKz2LH7PH/AATRnvNBGsfFDxDfRX2oQcaZoEsSxwRuvKyO8b72wedoABzy3Wvlv9sbw5oXwR8b6r8PfBy3EWiaaysDcsrSvI6BnLMqjcQTgE84UZJr9o9Chl0/SrG2fJMUCRkdeQoBr8O/27vEqar+0B47eMqyjVLiJSDnhXKfrtrKjOU5tvsZVqcYxjGK3Z80RXch1SOfdlt4AruJPC3iTw3Hpmq20ciPfxvqFt5BPmBE+YsAOeF+fIzgcnGK5LwfpD+IPEml6ahKvdXUcKnHdmCj+dfuB4O/ZA8H+PPhD4IuNW017bXNGSe80q6t5TE8YliEaxv2eMokRKn04Iyc6OpKlTVRd/0NJU1UnyW6H5sav+13qHjv9nzxH4P8SuZddMUMVrf97mPzU3K/+2Fyd38QznkZPjv7Mfi1Ph9+0D8O9buLg2tnDrMCXc+ceXBI3lSn8I3euv8A2l/g6vw81641HSrZ4NJmmMdzbgcWk2TwB2U9h2Ix3Arw1IC+ntcMMLv2q3qQBn+Y/OtKlR1rPqhU/cXkf0e3vw2iifzHnkkA6AVf0awngUxfZzs6Ams39nfxdJ4/+Afw68QXc/nXeo+H7C5uHPO6YwJ5n/j+6u8luFi5A6V5rxVWS5Z6nb7OK1R4fZftG+FmXBku1+sJxWNN8YvDyeML3XIXuJDNpkVkiiLBi2ySuzf8C3x/98V8yW92+zOfbpT9S1KVdHvvKnhtpRA5Wa4cJGnyn5mY9AOpPoKzU7sFY2vjT8ZksdG0nQyxFtZ2UEK2gbPzKqknPqSDk1z/AOztqWneIPHtvq/iFJzpNgTOtvF8wkkH3A3+zk5I74+tfOfiLxfc/EHxH4z1DSbi1vtB8M24mub3zcCTG7KR8Yb5Uc9ecYHUV778Fp7W38BWWpWpNxFfILgPChbKdAOOT34/Cu2tKPLZPbQ8+nzzrXktNz7jh+Oug3JjRFuElZwgBj9T1r8Lv2g9bXX/AB54h1bySi6jqdzOm484MpOP/r1+mlrqmZN6s3y/NypB49sV+cPxe0m3nsfC+maesuoaze2pmMEK7m8yaZ2WMADJPI/MVOG97mtpoa4nSUPUo/sp+Dz4y+KWnEsEh08/bJDnBypAjA9zIyfrX7gWvxz8O2NskEcV1FFAixxRhP4QMDv6CvyD/Ym8MS6R8SdWm1BGtDp9tsnjuF2Mkpk4BzyCCp/Kvte78TWb2k7Wl5C0ygnLtuAPfgcn6CqxFRKEIPda/f8A8MVRSc5zv/SKP7VXgrQvF9/qWs6DB/aOlakjPq2mToVKHGXlj9f72Oqnke35yar4Cm8G+B/GGnarFveC6tpdOuUYfvMM6OcdcFXXI9QOvWv0Jj8cQJdJ52oWkqhQHSGB2w3X34IPQj+tfFf7SzR2HiXV9LSSW3sUhS608SZVZI2cboyDyDG3yjPJG09KnDVY81pdmvwMsRGSs6e11f7z7/8A+Ccf7TmkSfstaNoutTyQ3vh26n0xSqFvMj3CWM8DsswX/gFfSFx+0f4RVsG6mPqfKP8AhX5XfsrWesfDa78T6Dr8FxZxTtb3doDbSCOXIcOyHb6BAR6ivYda+JWg6ZCZbvUFtwy71SVShYHp94Ac/wBK5pSUZaK51cytqbNvqHHzSgc1LeypfWFxbSKGWaNom3EEYII6Hr/KiiuNtjieDy/CHx1omg654b8PXWg/2FrKN9pNynkzlyoUspijABwB1BGR05Odz4caD8Vfhn4fsNA0y68OXOjWmSi3hlkkClizLvUR8ZY4yCRkDJ4ooqVUaZTj2Z195rPxLN9JeRwWkkkkSxLaQ3ixwIOcudyFiecdTnA4rx74bfCD4geANeuNZl07S9RvvsX2KBYdQeMxKFVSQCmMttyTnqxIx0JRR7VrZfmL2fRtlbwP8Ofi14M8b+INfi03S7mPVpJTJa398zxoWk35GOpHIBP9416pLP8AFaRAIING0wOG/wBUNzKSOPm6ZBwc7T054yCUU1Vvq1+f+YnTvs2vu/yM26h+MB85k1PTAJi2I3kkYLkYG3G08dfvfoMV5r4v+Bvj/wAfa3He65q+jtJGY87hLghDkAk72A5OcYz3zgUUU1Uv0RPI1s2dGPh349QxMupaGZl4MuyQswAx8xZemP07UWngDxIzxy3P/CNOWxl1tWZpBxwflAbp09hmiitlUfZfcczpJdX95//Z0-01 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.compact.xml b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.compact.xml new file mode 100644 index 0000000..1d19ad7 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.compact.xml @@ -0,0 +1 @@ +11xxx yyyxxxyyytfu@aon.at+0 (999) 99999++0 (999) 999991/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgASABgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9htgcEdTWjboygbRUltCoI2p+lX/ALLKVyqYHrX6aj80WHkVVD/xHA96PNUPgAs1cV+0P4T+KN58ILuf4Zabc3evTzrF9ot5oYvs8IBMjgykDPAUYwRuyOleG/sjfD34seNNM1JviNqOq2+k2120I/tG9nlurvCjdGAX8vygerMrlslRjBI8OWa05V5YWjBymna221rtX3irpNq+uiuerHJ6joqvUkoxfz72WnV20T/A+q7KeO9mdI54pGjba6I4JQ+hHar8ieUQc5qXR/Bmn6Lam20+zjtIiu0+UNrEdst147c8V5f8Wta8c/BnS5Nf0yzt/GvheFwb2C9kMN5p0ZODKJFUiWJe+5d6gZLMMkevKfs4801621OGOFcnaP4noksQuWAGfwqRNGwhbado6mvm/wCDP7eHhX4ifExfB2rWEWhteSGLTdTS58yCaTtG+VGwt0U8gkgccZ+sm8FLrt7bxC0Sa6LYjcLh1Ps3UcZ/Cs1ioTpylSknbu7ffo7fcarASjJe1T17I4ifW9Eh1yPRJdTsl1mSMypp7XCCdkHVgmd2PfFSyWMjMdgAU9K838Z/Df4efAD4g+MfGXiTU9Vk8RzWa3EFs0yxwCB8oQioFZ23QtyT0K9SSab+x946T4k/Ca5uhLJPHYavdWURlZmdY/llRWLEk4WUDkngAdq8fJ83nmqdeMUqTS5Xd3b1UtHFWS6PRvW8Ud+My2nhlGCk3PW6srJaW1Ter7bebO9m03AIcZzWVc6IkhPyg/WvQH0+B87jt+tVLm1s0QkOuRX0nOjy3hLrU6q00exViixDcO+K6C20C2nQAKoB9q5Cyv7p3LhSM9Tit2XUTp9k9zcXKwRRI0kjscKigZJP0ArzpKT6n0MVHsSeHdeiuvFfjDwxJufT9Et7WZoQdvmNcKxUH1H7uQn3K+lR+HtHsIPPhjijtI5ZDIqJwNx6/wAv0r5s/ZB+OMnxb1f4teKXjKw6nqFrHbBufLhiSRUT6hSCe2W4Ar2nxdo154v+HfiWx0y+NhqkljK9ldoxBguUG+FwV5GHVTxzxXxEcsg8zebT+OPuxf8Ada1XzbbPY+syeF+rR+F6teaPTbXwvbFWPm8U2TRtPWGZZNjREEOHwQR3BHevjrw1+1Hrvw5FrY+OfFOg+K0CYll06KSC+TA6sFDRNyMYPlnv9bEf7aeleM/BnjHU4bQ6dZ6csUFhmUtJPM6sxZiOMKApwP7y5619R7dyjzKTPKSjzcr0PjP9s/4QeA/h18WIZPADodNuXa4ns4wf9FnLEsi5/wCWY6rxx06AZ/X/APZk12Lxj8OfC/iG4kWe8k0mF5pQ2SZtoWQ/XIbP1r8G/FWuXviHxv59xcmSS4lBBZs4XPA+lffn7Fn7RlnY2dn4IbU5I7+2uZntvMICsrxxgxA9yCjnB/vflwfVW6Mo09L7/P8AT8ivrN68PadtPlt/XVl//grFdw614o+HM1nEIpcahYzzA/6xCInCt/ukEj/eb1qD/gmDd/a/AHjjwxOF83SNYS6GOpSeIAZ9eYDU3/BQHwdf+KPhlb+IrELLPoV39qmUnB8h1KOR9CUJ9ga8d/4JdfFWPR/jnregagcJ4i0orEF/intiXXj/AK5tOfwpZfQlgKSoyd2pO3oy6t61aU0vdaX3o/STVNCh2AIMtjqBWJNolnCjGZTk+tdVJrUdnPIRCWV+gINNe1iuUJkspJQ3OVXgV73PJbmfs4vodNbfDKR4fmuecDAUYryn9ojwVe2vw+k0G2dpdQ8T3cehWqISC/nBjKCR90eSk3zdutfQ1lfKr74w5X1PSuJ8Z3Ca98YPANo0fmw6ZDqGsuuMgSKkdtHn8LuUj/dPpXzf1rEXaex3ckLHyv8ACvwBp3wOi1rwxpgVLIahcMjqoXzGRzCWP/frH4V8/ftfftJeJbHUbf4VeBzcjVtXVBevYgm4kEhxHbx45Bbq2OoIHQmvqrx5pmoPocviWSDyLS91i/ltGxgmB5jImfxd/wAjXlXhrwL4U0/4tr8RXtzN4nlgFqksr7li+TYWRT0Yr8pPp9Tnd1b0UktTJRtKz2LH7PH/AATRnvNBGsfFDxDfRX2oQcaZoEsSxwRuvKyO8b72wedoABzy3Wvlv9sbw5oXwR8b6r8PfBy3EWiaaysDcsrSvI6BnLMqjcQTgE84UZJr9o9Chl0/SrG2fJMUCRkdeQoBr8O/27vEqar+0B47eMqyjVLiJSDnhXKfrtrKjOU5tvsZVqcYxjGK3Z80RXch1SOfdlt4AruJPC3iTw3Hpmq20ciPfxvqFt5BPmBE+YsAOeF+fIzgcnGK5LwfpD+IPEml6ahKvdXUcKnHdmCj+dfuB4O/ZA8H+PPhD4IuNW017bXNGSe80q6t5TE8YliEaxv2eMokRKn04Iyc6OpKlTVRd/0NJU1UnyW6H5sav+13qHjv9nzxH4P8SuZddMUMVrf97mPzU3K/+2Fyd38QznkZPjv7Mfi1Ph9+0D8O9buLg2tnDrMCXc+ceXBI3lSn8I3euv8A2l/g6vw81641HSrZ4NJmmMdzbgcWk2TwB2U9h2Ix3Arw1IC+ntcMMLv2q3qQBn+Y/OtKlR1rPqhU/cXkf0e3vw2iifzHnkkA6AVf0awngUxfZzs6Ams39nfxdJ4/+Afw68QXc/nXeo+H7C5uHPO6YwJ5n/j+6u8luFi5A6V5rxVWS5Z6nb7OK1R4fZftG+FmXBku1+sJxWNN8YvDyeML3XIXuJDNpkVkiiLBi2ySuzf8C3x/98V8yW92+zOfbpT9S1KVdHvvKnhtpRA5Wa4cJGnyn5mY9AOpPoKzU7sFY2vjT8ZksdG0nQyxFtZ2UEK2gbPzKqknPqSDk1z/AOztqWneIPHtvq/iFJzpNgTOtvF8wkkH3A3+zk5I74+tfOfiLxfc/EHxH4z1DSbi1vtB8M24mub3zcCTG7KR8Yb5Uc9ecYHUV778Fp7W38BWWpWpNxFfILgPChbKdAOOT34/Cu2tKPLZPbQ8+nzzrXktNz7jh+Oug3JjRFuElZwgBj9T1r8Lv2g9bXX/AB54h1bySi6jqdzOm484MpOP/r1+mlrqmZN6s3y/NypB49sV+cPxe0m3nsfC+maesuoaze2pmMEK7m8yaZ2WMADJPI/MVOG97mtpoa4nSUPUo/sp+Dz4y+KWnEsEh08/bJDnBypAjA9zIyfrX7gWvxz8O2NskEcV1FFAixxRhP4QMDv6CvyD/Ym8MS6R8SdWm1BGtDp9tsnjuF2Mkpk4BzyCCp/Kvte78TWb2k7Wl5C0ygnLtuAPfgcn6CqxFRKEIPda/f8A8MVRSc5zv/SKP7VXgrQvF9/qWs6DB/aOlakjPq2mToVKHGXlj9f72Oqnke35yar4Cm8G+B/GGnarFveC6tpdOuUYfvMM6OcdcFXXI9QOvWv0Jj8cQJdJ52oWkqhQHSGB2w3X34IPQj+tfFf7SzR2HiXV9LSSW3sUhS608SZVZI2cboyDyDG3yjPJG09KnDVY81pdmvwMsRGSs6e11f7z7/8A+Ccf7TmkSfstaNoutTyQ3vh26n0xSqFvMj3CWM8DsswX/gFfSFx+0f4RVsG6mPqfKP8AhX5XfsrWesfDa78T6Dr8FxZxTtb3doDbSCOXIcOyHb6BAR6ivYda+JWg6ZCZbvUFtwy71SVShYHp94Ac/wBK5pSUZaK51cytqbNvqHHzSgc1LeypfWFxbSKGWaNom3EEYII6Hr/KiiuNtjieDy/CHx1omg654b8PXWg/2FrKN9pNynkzlyoUspijABwB1BGR05Odz4caD8Vfhn4fsNA0y68OXOjWmSi3hlkkClizLvUR8ZY4yCRkDJ4ooqVUaZTj2Z195rPxLN9JeRwWkkkkSxLaQ3ixwIOcudyFiecdTnA4rx74bfCD4geANeuNZl07S9RvvsX2KBYdQeMxKFVSQCmMttyTnqxIx0JRR7VrZfmL2fRtlbwP8Ofi14M8b+INfi03S7mPVpJTJa398zxoWk35GOpHIBP9416pLP8AFaRAIING0wOG/wBUNzKSOPm6ZBwc7T054yCUU1Vvq1+f+YnTvs2vu/yM26h+MB85k1PTAJi2I3kkYLkYG3G08dfvfoMV5r4v+Bvj/wAfa3He65q+jtJGY87hLghDkAk72A5OcYz3zgUUU1Uv0RPI1s2dGPh349QxMupaGZl4MuyQswAx8xZemP07UWngDxIzxy3P/CNOWxl1tWZpBxwflAbp09hmiitlUfZfcczpJdX95//Z0-01 \ No newline at end of file diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.indent2.xml b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.indent2.xml new file mode 100644 index 0000000..8e8648f --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.indent2.xml @@ -0,0 +1,26 @@ + + + + 1 + + + 1 + + + xxx yyy + xxx + yyy + tfu@aon.at + +0 (999) 99999 + ++0 (999) 99999 + + 1 + /9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgASABgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9htgcEdTWjboygbRUltCoI2p+lX/ALLKVyqYHrX6aj80WHkVVD/xHA96PNUPgAs1cV+0P4T+KN58ILuf4Zabc3evTzrF9ot5oYvs8IBMjgykDPAUYwRuyOleG/sjfD34seNNM1JviNqOq2+k2120I/tG9nlurvCjdGAX8vygerMrlslRjBI8OWa05V5YWjBymna221rtX3irpNq+uiuerHJ6joqvUkoxfz72WnV20T/A+q7KeO9mdI54pGjba6I4JQ+hHar8ieUQc5qXR/Bmn6Lam20+zjtIiu0+UNrEdst147c8V5f8Wta8c/BnS5Nf0yzt/GvheFwb2C9kMN5p0ZODKJFUiWJe+5d6gZLMMkevKfs4801621OGOFcnaP4noksQuWAGfwqRNGwhbado6mvm/wCDP7eHhX4ifExfB2rWEWhteSGLTdTS58yCaTtG+VGwt0U8gkgccZ+sm8FLrt7bxC0Sa6LYjcLh1Ps3UcZ/Cs1ioTpylSknbu7ffo7fcarASjJe1T17I4ifW9Eh1yPRJdTsl1mSMypp7XCCdkHVgmd2PfFSyWMjMdgAU9K838Z/Df4efAD4g+MfGXiTU9Vk8RzWa3EFs0yxwCB8oQioFZ23QtyT0K9SSab+x946T4k/Ca5uhLJPHYavdWURlZmdY/llRWLEk4WUDkngAdq8fJ83nmqdeMUqTS5Xd3b1UtHFWS6PRvW8Ud+My2nhlGCk3PW6srJaW1Ter7bebO9m03AIcZzWVc6IkhPyg/WvQH0+B87jt+tVLm1s0QkOuRX0nOjy3hLrU6q00exViixDcO+K6C20C2nQAKoB9q5Cyv7p3LhSM9Tit2XUTp9k9zcXKwRRI0kjscKigZJP0ArzpKT6n0MVHsSeHdeiuvFfjDwxJufT9Et7WZoQdvmNcKxUH1H7uQn3K+lR+HtHsIPPhjijtI5ZDIqJwNx6/wAv0r5s/ZB+OMnxb1f4teKXjKw6nqFrHbBufLhiSRUT6hSCe2W4Ar2nxdo154v+HfiWx0y+NhqkljK9ldoxBguUG+FwV5GHVTxzxXxEcsg8zebT+OPuxf8Ada1XzbbPY+syeF+rR+F6teaPTbXwvbFWPm8U2TRtPWGZZNjREEOHwQR3BHevjrw1+1Hrvw5FrY+OfFOg+K0CYll06KSC+TA6sFDRNyMYPlnv9bEf7aeleM/BnjHU4bQ6dZ6csUFhmUtJPM6sxZiOMKApwP7y5619R7dyjzKTPKSjzcr0PjP9s/4QeA/h18WIZPADodNuXa4ns4wf9FnLEsi5/wCWY6rxx06AZ/X/APZk12Lxj8OfC/iG4kWe8k0mF5pQ2SZtoWQ/XIbP1r8G/FWuXviHxv59xcmSS4lBBZs4XPA+lffn7Fn7RlnY2dn4IbU5I7+2uZntvMICsrxxgxA9yCjnB/vflwfVW6Mo09L7/P8AT8ivrN68PadtPlt/XVl//grFdw614o+HM1nEIpcahYzzA/6xCInCt/ukEj/eb1qD/gmDd/a/AHjjwxOF83SNYS6GOpSeIAZ9eYDU3/BQHwdf+KPhlb+IrELLPoV39qmUnB8h1KOR9CUJ9ga8d/4JdfFWPR/jnregagcJ4i0orEF/intiXXj/AK5tOfwpZfQlgKSoyd2pO3oy6t61aU0vdaX3o/STVNCh2AIMtjqBWJNolnCjGZTk+tdVJrUdnPIRCWV+gINNe1iuUJkspJQ3OVXgV73PJbmfs4vodNbfDKR4fmuecDAUYryn9ojwVe2vw+k0G2dpdQ8T3cehWqISC/nBjKCR90eSk3zdutfQ1lfKr74w5X1PSuJ8Z3Ca98YPANo0fmw6ZDqGsuuMgSKkdtHn8LuUj/dPpXzf1rEXaex3ckLHyv8ACvwBp3wOi1rwxpgVLIahcMjqoXzGRzCWP/frH4V8/ftfftJeJbHUbf4VeBzcjVtXVBevYgm4kEhxHbx45Bbq2OoIHQmvqrx5pmoPocviWSDyLS91i/ltGxgmB5jImfxd/wAjXlXhrwL4U0/4tr8RXtzN4nlgFqksr7li+TYWRT0Yr8pPp9Tnd1b0UktTJRtKz2LH7PH/AATRnvNBGsfFDxDfRX2oQcaZoEsSxwRuvKyO8b72wedoABzy3Wvlv9sbw5oXwR8b6r8PfBy3EWiaaysDcsrSvI6BnLMqjcQTgE84UZJr9o9Chl0/SrG2fJMUCRkdeQoBr8O/27vEqar+0B47eMqyjVLiJSDnhXKfrtrKjOU5tvsZVqcYxjGK3Z80RXch1SOfdlt4AruJPC3iTw3Hpmq20ciPfxvqFt5BPmBE+YsAOeF+fIzgcnGK5LwfpD+IPEml6ahKvdXUcKnHdmCj+dfuB4O/ZA8H+PPhD4IuNW017bXNGSe80q6t5TE8YliEaxv2eMokRKn04Iyc6OpKlTVRd/0NJU1UnyW6H5sav+13qHjv9nzxH4P8SuZddMUMVrf97mPzU3K/+2Fyd38QznkZPjv7Mfi1Ph9+0D8O9buLg2tnDrMCXc+ceXBI3lSn8I3euv8A2l/g6vw81641HSrZ4NJmmMdzbgcWk2TwB2U9h2Ix3Arw1IC+ntcMMLv2q3qQBn+Y/OtKlR1rPqhU/cXkf0e3vw2iifzHnkkA6AVf0awngUxfZzs6Ams39nfxdJ4/+Afw68QXc/nXeo+H7C5uHPO6YwJ5n/j+6u8luFi5A6V5rxVWS5Z6nb7OK1R4fZftG+FmXBku1+sJxWNN8YvDyeML3XIXuJDNpkVkiiLBi2ySuzf8C3x/98V8yW92+zOfbpT9S1KVdHvvKnhtpRA5Wa4cJGnyn5mY9AOpPoKzU7sFY2vjT8ZksdG0nQyxFtZ2UEK2gbPzKqknPqSDk1z/AOztqWneIPHtvq/iFJzpNgTOtvF8wkkH3A3+zk5I74+tfOfiLxfc/EHxH4z1DSbi1vtB8M24mub3zcCTG7KR8Yb5Uc9ecYHUV778Fp7W38BWWpWpNxFfILgPChbKdAOOT34/Cu2tKPLZPbQ8+nzzrXktNz7jh+Oug3JjRFuElZwgBj9T1r8Lv2g9bXX/AB54h1bySi6jqdzOm484MpOP/r1+mlrqmZN6s3y/NypB49sV+cPxe0m3nsfC+maesuoaze2pmMEK7m8yaZ2WMADJPI/MVOG97mtpoa4nSUPUo/sp+Dz4y+KWnEsEh08/bJDnBypAjA9zIyfrX7gWvxz8O2NskEcV1FFAixxRhP4QMDv6CvyD/Ym8MS6R8SdWm1BGtDp9tsnjuF2Mkpk4BzyCCp/Kvte78TWb2k7Wl5C0ygnLtuAPfgcn6CqxFRKEIPda/f8A8MVRSc5zv/SKP7VXgrQvF9/qWs6DB/aOlakjPq2mToVKHGXlj9f72Oqnke35yar4Cm8G+B/GGnarFveC6tpdOuUYfvMM6OcdcFXXI9QOvWv0Jj8cQJdJ52oWkqhQHSGB2w3X34IPQj+tfFf7SzR2HiXV9LSSW3sUhS608SZVZI2cboyDyDG3yjPJG09KnDVY81pdmvwMsRGSs6e11f7z7/8A+Ccf7TmkSfstaNoutTyQ3vh26n0xSqFvMj3CWM8DsswX/gFfSFx+0f4RVsG6mPqfKP8AhX5XfsrWesfDa78T6Dr8FxZxTtb3doDbSCOXIcOyHb6BAR6ivYda+JWg6ZCZbvUFtwy71SVShYHp94Ac/wBK5pSUZaK51cytqbNvqHHzSgc1LeypfWFxbSKGWaNom3EEYII6Hr/KiiuNtjieDy/CHx1omg654b8PXWg/2FrKN9pNynkzlyoUspijABwB1BGR05Odz4caD8Vfhn4fsNA0y68OXOjWmSi3hlkkClizLvUR8ZY4yCRkDJ4ooqVUaZTj2Z195rPxLN9JeRwWkkkkSxLaQ3ixwIOcudyFiecdTnA4rx74bfCD4geANeuNZl07S9RvvsX2KBYdQeMxKFVSQCmMttyTnqxIx0JRR7VrZfmL2fRtlbwP8Ofi14M8b+INfi03S7mPVpJTJa398zxoWk35GOpHIBP9416pLP8AFaRAIING0wOG/wBUNzKSOPm6ZBwc7T054yCUU1Vvq1+f+YnTvs2vu/yM26h+MB85k1PTAJi2I3kkYLkYG3G08dfvfoMV5r4v+Bvj/wAfa3He65q+jtJGY87hLghDkAk72A5OcYz3zgUUU1Uv0RPI1s2dGPh349QxMupaGZl4MuyQswAx8xZemP07UWngDxIzxy3P/CNOWxl1tWZpBxwflAbp09hmiitlUfZfcczpJdX95//Z + + + + 0-0 + 1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.xml b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.xml new file mode 100644 index 0000000..079d152 --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-040-search-response.wbxml.xml @@ -0,0 +1,26 @@ + + + +1 + + +1 + + +xxx yyy +xxx +yyy +tfu@aon.at ++0 (999) 99999 +++0 (999) 99999 + +1 +/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgASABgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9htgcEdTWjboygbRUltCoI2p+lX/ALLKVyqYHrX6aj80WHkVVD/xHA96PNUPgAs1cV+0P4T+KN58ILuf4Zabc3evTzrF9ot5oYvs8IBMjgykDPAUYwRuyOleG/sjfD34seNNM1JviNqOq2+k2120I/tG9nlurvCjdGAX8vygerMrlslRjBI8OWa05V5YWjBymna221rtX3irpNq+uiuerHJ6joqvUkoxfz72WnV20T/A+q7KeO9mdI54pGjba6I4JQ+hHar8ieUQc5qXR/Bmn6Lam20+zjtIiu0+UNrEdst147c8V5f8Wta8c/BnS5Nf0yzt/GvheFwb2C9kMN5p0ZODKJFUiWJe+5d6gZLMMkevKfs4801621OGOFcnaP4noksQuWAGfwqRNGwhbado6mvm/wCDP7eHhX4ifExfB2rWEWhteSGLTdTS58yCaTtG+VGwt0U8gkgccZ+sm8FLrt7bxC0Sa6LYjcLh1Ps3UcZ/Cs1ioTpylSknbu7ffo7fcarASjJe1T17I4ifW9Eh1yPRJdTsl1mSMypp7XCCdkHVgmd2PfFSyWMjMdgAU9K838Z/Df4efAD4g+MfGXiTU9Vk8RzWa3EFs0yxwCB8oQioFZ23QtyT0K9SSab+x946T4k/Ca5uhLJPHYavdWURlZmdY/llRWLEk4WUDkngAdq8fJ83nmqdeMUqTS5Xd3b1UtHFWS6PRvW8Ud+My2nhlGCk3PW6srJaW1Ter7bebO9m03AIcZzWVc6IkhPyg/WvQH0+B87jt+tVLm1s0QkOuRX0nOjy3hLrU6q00exViixDcO+K6C20C2nQAKoB9q5Cyv7p3LhSM9Tit2XUTp9k9zcXKwRRI0kjscKigZJP0ArzpKT6n0MVHsSeHdeiuvFfjDwxJufT9Et7WZoQdvmNcKxUH1H7uQn3K+lR+HtHsIPPhjijtI5ZDIqJwNx6/wAv0r5s/ZB+OMnxb1f4teKXjKw6nqFrHbBufLhiSRUT6hSCe2W4Ar2nxdo154v+HfiWx0y+NhqkljK9ldoxBguUG+FwV5GHVTxzxXxEcsg8zebT+OPuxf8Ada1XzbbPY+syeF+rR+F6teaPTbXwvbFWPm8U2TRtPWGZZNjREEOHwQR3BHevjrw1+1Hrvw5FrY+OfFOg+K0CYll06KSC+TA6sFDRNyMYPlnv9bEf7aeleM/BnjHU4bQ6dZ6csUFhmUtJPM6sxZiOMKApwP7y5619R7dyjzKTPKSjzcr0PjP9s/4QeA/h18WIZPADodNuXa4ns4wf9FnLEsi5/wCWY6rxx06AZ/X/APZk12Lxj8OfC/iG4kWe8k0mF5pQ2SZtoWQ/XIbP1r8G/FWuXviHxv59xcmSS4lBBZs4XPA+lffn7Fn7RlnY2dn4IbU5I7+2uZntvMICsrxxgxA9yCjnB/vflwfVW6Mo09L7/P8AT8ivrN68PadtPlt/XVl//grFdw614o+HM1nEIpcahYzzA/6xCInCt/ukEj/eb1qD/gmDd/a/AHjjwxOF83SNYS6GOpSeIAZ9eYDU3/BQHwdf+KPhlb+IrELLPoV39qmUnB8h1KOR9CUJ9ga8d/4JdfFWPR/jnregagcJ4i0orEF/intiXXj/AK5tOfwpZfQlgKSoyd2pO3oy6t61aU0vdaX3o/STVNCh2AIMtjqBWJNolnCjGZTk+tdVJrUdnPIRCWV+gINNe1iuUJkspJQ3OVXgV73PJbmfs4vodNbfDKR4fmuecDAUYryn9ojwVe2vw+k0G2dpdQ8T3cehWqISC/nBjKCR90eSk3zdutfQ1lfKr74w5X1PSuJ8Z3Ca98YPANo0fmw6ZDqGsuuMgSKkdtHn8LuUj/dPpXzf1rEXaex3ckLHyv8ACvwBp3wOi1rwxpgVLIahcMjqoXzGRzCWP/frH4V8/ftfftJeJbHUbf4VeBzcjVtXVBevYgm4kEhxHbx45Bbq2OoIHQmvqrx5pmoPocviWSDyLS91i/ltGxgmB5jImfxd/wAjXlXhrwL4U0/4tr8RXtzN4nlgFqksr7li+TYWRT0Yr8pPp9Tnd1b0UktTJRtKz2LH7PH/AATRnvNBGsfFDxDfRX2oQcaZoEsSxwRuvKyO8b72wedoABzy3Wvlv9sbw5oXwR8b6r8PfBy3EWiaaysDcsrSvI6BnLMqjcQTgE84UZJr9o9Chl0/SrG2fJMUCRkdeQoBr8O/27vEqar+0B47eMqyjVLiJSDnhXKfrtrKjOU5tvsZVqcYxjGK3Z80RXch1SOfdlt4AruJPC3iTw3Hpmq20ciPfxvqFt5BPmBE+YsAOeF+fIzgcnGK5LwfpD+IPEml6ahKvdXUcKnHdmCj+dfuB4O/ZA8H+PPhD4IuNW017bXNGSe80q6t5TE8YliEaxv2eMokRKn04Iyc6OpKlTVRd/0NJU1UnyW6H5sav+13qHjv9nzxH4P8SuZddMUMVrf97mPzU3K/+2Fyd38QznkZPjv7Mfi1Ph9+0D8O9buLg2tnDrMCXc+ceXBI3lSn8I3euv8A2l/g6vw81641HSrZ4NJmmMdzbgcWk2TwB2U9h2Ix3Arw1IC+ntcMMLv2q3qQBn+Y/OtKlR1rPqhU/cXkf0e3vw2iifzHnkkA6AVf0awngUxfZzs6Ams39nfxdJ4/+Afw68QXc/nXeo+H7C5uHPO6YwJ5n/j+6u8luFi5A6V5rxVWS5Z6nb7OK1R4fZftG+FmXBku1+sJxWNN8YvDyeML3XIXuJDNpkVkiiLBi2ySuzf8C3x/98V8yW92+zOfbpT9S1KVdHvvKnhtpRA5Wa4cJGnyn5mY9AOpPoKzU7sFY2vjT8ZksdG0nQyxFtZ2UEK2gbPzKqknPqSDk1z/AOztqWneIPHtvq/iFJzpNgTOtvF8wkkH3A3+zk5I74+tfOfiLxfc/EHxH4z1DSbi1vtB8M24mub3zcCTG7KR8Yb5Uc9ecYHUV778Fp7W38BWWpWpNxFfILgPChbKdAOOT34/Cu2tKPLZPbQ8+nzzrXktNz7jh+Oug3JjRFuElZwgBj9T1r8Lv2g9bXX/AB54h1bySi6jqdzOm484MpOP/r1+mlrqmZN6s3y/NypB49sV+cPxe0m3nsfC+maesuoaze2pmMEK7m8yaZ2WMADJPI/MVOG97mtpoa4nSUPUo/sp+Dz4y+KWnEsEh08/bJDnBypAjA9zIyfrX7gWvxz8O2NskEcV1FFAixxRhP4QMDv6CvyD/Ym8MS6R8SdWm1BGtDp9tsnjuF2Mkpk4BzyCCp/Kvte78TWb2k7Wl5C0ygnLtuAPfgcn6CqxFRKEIPda/f8A8MVRSc5zv/SKP7VXgrQvF9/qWs6DB/aOlakjPq2mToVKHGXlj9f72Oqnke35yar4Cm8G+B/GGnarFveC6tpdOuUYfvMM6OcdcFXXI9QOvWv0Jj8cQJdJ52oWkqhQHSGB2w3X34IPQj+tfFf7SzR2HiXV9LSSW3sUhS608SZVZI2cboyDyDG3yjPJG09KnDVY81pdmvwMsRGSs6e11f7z7/8A+Ccf7TmkSfstaNoutTyQ3vh26n0xSqFvMj3CWM8DsswX/gFfSFx+0f4RVsG6mPqfKP8AhX5XfsrWesfDa78T6Dr8FxZxTtb3doDbSCOXIcOyHb6BAR6ivYda+JWg6ZCZbvUFtwy71SVShYHp94Ac/wBK5pSUZaK51cytqbNvqHHzSgc1LeypfWFxbSKGWaNom3EEYII6Hr/KiiuNtjieDy/CHx1omg654b8PXWg/2FrKN9pNynkzlyoUspijABwB1BGR05Odz4caD8Vfhn4fsNA0y68OXOjWmSi3hlkkClizLvUR8ZY4yCRkDJ4ooqVUaZTj2Z195rPxLN9JeRwWkkkkSxLaQ3ixwIOcudyFiecdTnA4rx74bfCD4geANeuNZl07S9RvvsX2KBYdQeMxKFVSQCmMttyTnqxIx0JRR7VrZfmL2fRtlbwP8Ofi14M8b+INfi03S7mPVpJTJa398zxoWk35GOpHIBP9416pLP8AFaRAIING0wOG/wBUNzKSOPm6ZBwc7T054yCUU1Vvq1+f+YnTvs2vu/yM26h+MB85k1PTAJi2I3kkYLkYG3G08dfvfoMV5r4v+Bvj/wAfa3He65q+jtJGY87hLghDkAk72A5OcYz3zgUUU1Uv0RPI1s2dGPh349QxMupaGZl4MuyQswAx8xZemP07UWngDxIzxy3P/CNOWxl1tWZpBxwflAbp09hmiitlUfZfcczpJdX95//Z + + + +0-0 +1 + + + diff --git a/test/fixtures/upstream/activesync/activesync-040-search-response.xml b/test/fixtures/upstream/activesync/activesync-040-search-response.xml new file mode 100644 index 0000000..d68123b --- /dev/null +++ b/test/fixtures/upstream/activesync/activesync-040-search-response.xml @@ -0,0 +1,26 @@ + + + + 1 + + + 1 + + + xxx yyy + xxx + yyy + tfu@aon.at + +0 (999) 99999 + ++0 (999) 99999 + + 1 + /9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCgsLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgASABgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9htgcEdTWjboygbRUltCoI2p+lX/ALLKVyqYHrX6aj80WHkVVD/xHA96PNUPgAs1cV+0P4T+KN58ILuf4Zabc3evTzrF9ot5oYvs8IBMjgykDPAUYwRuyOleG/sjfD34seNNM1JviNqOq2+k2120I/tG9nlurvCjdGAX8vygerMrlslRjBI8OWa05V5YWjBymna221rtX3irpNq+uiuerHJ6joqvUkoxfz72WnV20T/A+q7KeO9mdI54pGjba6I4JQ+hHar8ieUQc5qXR/Bmn6Lam20+zjtIiu0+UNrEdst147c8V5f8Wta8c/BnS5Nf0yzt/GvheFwb2C9kMN5p0ZODKJFUiWJe+5d6gZLMMkevKfs4801621OGOFcnaP4noksQuWAGfwqRNGwhbado6mvm/wCDP7eHhX4ifExfB2rWEWhteSGLTdTS58yCaTtG+VGwt0U8gkgccZ+sm8FLrt7bxC0Sa6LYjcLh1Ps3UcZ/Cs1ioTpylSknbu7ffo7fcarASjJe1T17I4ifW9Eh1yPRJdTsl1mSMypp7XCCdkHVgmd2PfFSyWMjMdgAU9K838Z/Df4efAD4g+MfGXiTU9Vk8RzWa3EFs0yxwCB8oQioFZ23QtyT0K9SSab+x946T4k/Ca5uhLJPHYavdWURlZmdY/llRWLEk4WUDkngAdq8fJ83nmqdeMUqTS5Xd3b1UtHFWS6PRvW8Ud+My2nhlGCk3PW6srJaW1Ter7bebO9m03AIcZzWVc6IkhPyg/WvQH0+B87jt+tVLm1s0QkOuRX0nOjy3hLrU6q00exViixDcO+K6C20C2nQAKoB9q5Cyv7p3LhSM9Tit2XUTp9k9zcXKwRRI0kjscKigZJP0ArzpKT6n0MVHsSeHdeiuvFfjDwxJufT9Et7WZoQdvmNcKxUH1H7uQn3K+lR+HtHsIPPhjijtI5ZDIqJwNx6/wAv0r5s/ZB+OMnxb1f4teKXjKw6nqFrHbBufLhiSRUT6hSCe2W4Ar2nxdo154v+HfiWx0y+NhqkljK9ldoxBguUG+FwV5GHVTxzxXxEcsg8zebT+OPuxf8Ada1XzbbPY+syeF+rR+F6teaPTbXwvbFWPm8U2TRtPWGZZNjREEOHwQR3BHevjrw1+1Hrvw5FrY+OfFOg+K0CYll06KSC+TA6sFDRNyMYPlnv9bEf7aeleM/BnjHU4bQ6dZ6csUFhmUtJPM6sxZiOMKApwP7y5619R7dyjzKTPKSjzcr0PjP9s/4QeA/h18WIZPADodNuXa4ns4wf9FnLEsi5/wCWY6rxx06AZ/X/APZk12Lxj8OfC/iG4kWe8k0mF5pQ2SZtoWQ/XIbP1r8G/FWuXviHxv59xcmSS4lBBZs4XPA+lffn7Fn7RlnY2dn4IbU5I7+2uZntvMICsrxxgxA9yCjnB/vflwfVW6Mo09L7/P8AT8ivrN68PadtPlt/XVl//grFdw614o+HM1nEIpcahYzzA/6xCInCt/ukEj/eb1qD/gmDd/a/AHjjwxOF83SNYS6GOpSeIAZ9eYDU3/BQHwdf+KPhlb+IrELLPoV39qmUnB8h1KOR9CUJ9ga8d/4JdfFWPR/jnregagcJ4i0orEF/intiXXj/AK5tOfwpZfQlgKSoyd2pO3oy6t61aU0vdaX3o/STVNCh2AIMtjqBWJNolnCjGZTk+tdVJrUdnPIRCWV+gINNe1iuUJkspJQ3OVXgV73PJbmfs4vodNbfDKR4fmuecDAUYryn9ojwVe2vw+k0G2dpdQ8T3cehWqISC/nBjKCR90eSk3zdutfQ1lfKr74w5X1PSuJ8Z3Ca98YPANo0fmw6ZDqGsuuMgSKkdtHn8LuUj/dPpXzf1rEXaex3ckLHyv8ACvwBp3wOi1rwxpgVLIahcMjqoXzGRzCWP/frH4V8/ftfftJeJbHUbf4VeBzcjVtXVBevYgm4kEhxHbx45Bbq2OoIHQmvqrx5pmoPocviWSDyLS91i/ltGxgmB5jImfxd/wAjXlXhrwL4U0/4tr8RXtzN4nlgFqksr7li+TYWRT0Yr8pPp9Tnd1b0UktTJRtKz2LH7PH/AATRnvNBGsfFDxDfRX2oQcaZoEsSxwRuvKyO8b72wedoABzy3Wvlv9sbw5oXwR8b6r8PfBy3EWiaaysDcsrSvI6BnLMqjcQTgE84UZJr9o9Chl0/SrG2fJMUCRkdeQoBr8O/27vEqar+0B47eMqyjVLiJSDnhXKfrtrKjOU5tvsZVqcYxjGK3Z80RXch1SOfdlt4AruJPC3iTw3Hpmq20ciPfxvqFt5BPmBE+YsAOeF+fIzgcnGK5LwfpD+IPEml6ahKvdXUcKnHdmCj+dfuB4O/ZA8H+PPhD4IuNW017bXNGSe80q6t5TE8YliEaxv2eMokRKn04Iyc6OpKlTVRd/0NJU1UnyW6H5sav+13qHjv9nzxH4P8SuZddMUMVrf97mPzU3K/+2Fyd38QznkZPjv7Mfi1Ph9+0D8O9buLg2tnDrMCXc+ceXBI3lSn8I3euv8A2l/g6vw81641HSrZ4NJmmMdzbgcWk2TwB2U9h2Ix3Arw1IC+ntcMMLv2q3qQBn+Y/OtKlR1rPqhU/cXkf0e3vw2iifzHnkkA6AVf0awngUxfZzs6Ams39nfxdJ4/+Afw68QXc/nXeo+H7C5uHPO6YwJ5n/j+6u8luFi5A6V5rxVWS5Z6nb7OK1R4fZftG+FmXBku1+sJxWNN8YvDyeML3XIXuJDNpkVkiiLBi2ySuzf8C3x/98V8yW92+zOfbpT9S1KVdHvvKnhtpRA5Wa4cJGnyn5mY9AOpPoKzU7sFY2vjT8ZksdG0nQyxFtZ2UEK2gbPzKqknPqSDk1z/AOztqWneIPHtvq/iFJzpNgTOtvF8wkkH3A3+zk5I74+tfOfiLxfc/EHxH4z1DSbi1vtB8M24mub3zcCTG7KR8Yb5Uc9ecYHUV778Fp7W38BWWpWpNxFfILgPChbKdAOOT34/Cu2tKPLZPbQ8+nzzrXktNz7jh+Oug3JjRFuElZwgBj9T1r8Lv2g9bXX/AB54h1bySi6jqdzOm484MpOP/r1+mlrqmZN6s3y/NypB49sV+cPxe0m3nsfC+maesuoaze2pmMEK7m8yaZ2WMADJPI/MVOG97mtpoa4nSUPUo/sp+Dz4y+KWnEsEh08/bJDnBypAjA9zIyfrX7gWvxz8O2NskEcV1FFAixxRhP4QMDv6CvyD/Ym8MS6R8SdWm1BGtDp9tsnjuF2Mkpk4BzyCCp/Kvte78TWb2k7Wl5C0ygnLtuAPfgcn6CqxFRKEIPda/f8A8MVRSc5zv/SKP7VXgrQvF9/qWs6DB/aOlakjPq2mToVKHGXlj9f72Oqnke35yar4Cm8G+B/GGnarFveC6tpdOuUYfvMM6OcdcFXXI9QOvWv0Jj8cQJdJ52oWkqhQHSGB2w3X34IPQj+tfFf7SzR2HiXV9LSSW3sUhS608SZVZI2cboyDyDG3yjPJG09KnDVY81pdmvwMsRGSs6e11f7z7/8A+Ccf7TmkSfstaNoutTyQ3vh26n0xSqFvMj3CWM8DsswX/gFfSFx+0f4RVsG6mPqfKP8AhX5XfsrWesfDa78T6Dr8FxZxTtb3doDbSCOXIcOyHb6BAR6ivYda+JWg6ZCZbvUFtwy71SVShYHp94Ac/wBK5pSUZaK51cytqbNvqHHzSgc1LeypfWFxbSKGWaNom3EEYII6Hr/KiiuNtjieDy/CHx1omg654b8PXWg/2FrKN9pNynkzlyoUspijABwB1BGR05Odz4caD8Vfhn4fsNA0y68OXOjWmSi3hlkkClizLvUR8ZY4yCRkDJ4ooqVUaZTj2Z195rPxLN9JeRwWkkkkSxLaQ3ixwIOcudyFiecdTnA4rx74bfCD4geANeuNZl07S9RvvsX2KBYdQeMxKFVSQCmMttyTnqxIx0JRR7VrZfmL2fRtlbwP8Ofi14M8b+INfi03S7mPVpJTJa398zxoWk35GOpHIBP9416pLP8AFaRAIING0wOG/wBUNzKSOPm6ZBwc7T054yCUU1Vvq1+f+YnTvs2vu/yM26h+MB85k1PTAJi2I3kkYLkYG3G08dfvfoMV5r4v+Bvj/wAfa3He65q+jtJGY87hLghDkAk72A5OcYz3zgUUU1Uv0RPI1s2dGPh349QxMupaGZl4MuyQswAx8xZemP07UWngDxIzxy3P/CNOWxl1tWZpBxwflAbp09hmiitlUfZfcczpJdX95//Z + + + + 0-0 + 1 + + + diff --git a/test/fixtures/upstream/airsync/airsync-001.anon.wbxml b/test/fixtures/upstream/airsync/airsync-001.anon.wbxml new file mode 100644 index 0000000..a2e78ed Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-001.anon.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-001.anon.wbxml.xml b/test/fixtures/upstream/airsync/airsync-001.anon.wbxml.xml new file mode 100644 index 0000000..13c3d83 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-001.anon.wbxml.xml @@ -0,0 +1,32 @@ + + + + + +Contacts +{F0A866C8-E590-42B9-830C-4CF4DFD545DF}12 +{F0A866C8-E590-42B9-830C-4CF4DFD545DF} + + +100 + +4 +4 +1 + + + +2147483800 + +Bue, Tryggve +Tryggve +Bue +12345678 + + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-001.nostrtbl.wbxml b/test/fixtures/upstream/airsync/airsync-001.nostrtbl.wbxml new file mode 100644 index 0000000..e52ce91 Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-001.wbxml b/test/fixtures/upstream/airsync/airsync-001.wbxml new file mode 100644 index 0000000..e7056ac Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-001.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-001.wbxml.canonical.xml b/test/fixtures/upstream/airsync/airsync-001.wbxml.canonical.xml new file mode 100644 index 0000000..a008e20 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-001.wbxml.canonical.xml @@ -0,0 +1 @@ +Contacts{F0A866C8-E590-42B9-830C-4CF4DFD545DF}12{F0A866C8-E590-42B9-830C-4CF4DFD545DF}1004412147483800Bue, TryggveTryggveBue12345678 \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-001.wbxml.compact.xml b/test/fixtures/upstream/airsync/airsync-001.wbxml.compact.xml new file mode 100644 index 0000000..a008e20 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-001.wbxml.compact.xml @@ -0,0 +1 @@ +Contacts{F0A866C8-E590-42B9-830C-4CF4DFD545DF}12{F0A866C8-E590-42B9-830C-4CF4DFD545DF}1004412147483800Bue, TryggveTryggveBue12345678 \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-001.wbxml.indent2.xml b/test/fixtures/upstream/airsync/airsync-001.wbxml.indent2.xml new file mode 100644 index 0000000..1058c08 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-001.wbxml.indent2.xml @@ -0,0 +1,32 @@ + + + + + + Contacts + {F0A866C8-E590-42B9-830C-4CF4DFD545DF}12 + {F0A866C8-E590-42B9-830C-4CF4DFD545DF} + + + 100 + + 4 + 4 + 1 + + + + 2147483800 + + Bue, Tryggve + Tryggve + Bue + 12345678 + + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-001.wbxml.xml b/test/fixtures/upstream/airsync/airsync-001.wbxml.xml new file mode 100644 index 0000000..13c3d83 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-001.wbxml.xml @@ -0,0 +1,32 @@ + + + + + +Contacts +{F0A866C8-E590-42B9-830C-4CF4DFD545DF}12 +{F0A866C8-E590-42B9-830C-4CF4DFD545DF} + + +100 + +4 +4 +1 + + + +2147483800 + +Bue, Tryggve +Tryggve +Bue +12345678 + + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-001.xml b/test/fixtures/upstream/airsync/airsync-001.xml new file mode 100644 index 0000000..2a467c8 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-001.xml @@ -0,0 +1,33 @@ + + + + + + Contacts + {F0A866C8-E590-42B9-830C-4CF4DFD545DF}12 + {F0A866C8-E590-42B9-830C-4CF4DFD545DF} + + + 100 + + 4 + 4 + 1 + + + + 2147483800 + + Bue, Tryggve + Tryggve + Bue + 12345678 + + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.anon.wbxml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.anon.wbxml new file mode 100644 index 0000000..1d5f8ba Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.anon.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.anon.wbxml.xml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.anon.wbxml.xml new file mode 100644 index 0000000..e657fab --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + +Mailbox + + +Calendar +test + + + + + +0-1 + +2 + + + + diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.nostrtbl.wbxml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.nostrtbl.wbxml new file mode 100644 index 0000000..c8b2eca Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml new file mode 100644 index 0000000..c8b2eca Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.canonical.xml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.canonical.xml new file mode 100644 index 0000000..073a558 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.canonical.xml @@ -0,0 +1 @@ +MailboxCalendartest0-12 \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.compact.xml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.compact.xml new file mode 100644 index 0000000..073a558 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.compact.xml @@ -0,0 +1 @@ +MailboxCalendartest0-12 \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.indent2.xml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.indent2.xml new file mode 100644 index 0000000..712be91 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.indent2.xml @@ -0,0 +1,21 @@ + + + + + Mailbox + + + Calendar + test + + + + + + 0-1 + + 2 + + + + diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.xml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.xml new file mode 100644 index 0000000..e657fab --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.wbxml.xml @@ -0,0 +1,21 @@ + + + + +Mailbox + + +Calendar +test + + + + + +0-1 + +2 + + + + diff --git a/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.xml b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.xml new file mode 100644 index 0000000..1c9b379 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.xml @@ -0,0 +1,22 @@ + + + + + Mailbox + + + Calendar + test + + + + + + 0-1 + + 2 + + + + diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.anon.wbxml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.anon.wbxml new file mode 100644 index 0000000..6d80357 Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.anon.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.anon.wbxml.xml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.anon.wbxml.xml new file mode 100644 index 0000000..2bce01b --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.anon.wbxml.xml @@ -0,0 +1,102 @@ + + + +1 + + +1 + +Calendar +RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksUAAAP +3 + +iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== +20090417T112208Z +20090417T090000Z +hfjjf +040000008200E00074C5B7101A82E00800000000F4BD10E469BEC901000000000000000010000000449579D4A72EED4EB3F70D04913F0277 +maemo +maemo@test.local + + +maemo@test.local +maemo +0 +1 + + +meetingroom testi +20090417T100000Z + +2 +365 +<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + +0 +0 +0 +15 +5 +1 + + + +Calendar +RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksSAAAP +3 + +iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== +20090417T105620Z +20090417T110000Z +tent +040000008200E00074C5B7101A82E008000000002E1A5BA069BEC901000000000000000010000000F1BB45467D72B44F822E9686F1D18ED4 +maemo +maemo@test.local + + +meetingroomtest@test.local +meetingroom testi +0 +3 + + +maemo@test.local +maemo +0 +1 + + +meetingroom testi +20090417T120000Z + +2 +365 +<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + +0 +0 +0 +15 +5 +1 + + +0-1 +19 + + + diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.nostrtbl.wbxml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.nostrtbl.wbxml new file mode 100644 index 0000000..d34ddb0 Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml new file mode 100644 index 0000000..e381c09 Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.canonical.xml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.canonical.xml new file mode 100644 index 0000000..fc00fe8 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.canonical.xml @@ -0,0 +1 @@ +11CalendarRgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksUAAAP3iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w==20090417T112208Z20090417T090000Zhfjjf040000008200E00074C5B7101A82E00800000000F4BD10E469BEC901000000000000000010000000449579D4A72EED4EB3F70D04913F0277maemomaemo@test.localmaemo@test.localmaemo01meetingroom testi20090417T100000Z2365<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Generator" content="Microsoft Exchange Server"> <!-- converted from text --> <style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> <body> <font size="2"><div class="PlainText">&nbsp;</div></font> </body> </html>0001551CalendarRgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksSAAAP3iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w==20090417T105620Z20090417T110000Ztent040000008200E00074C5B7101A82E008000000002E1A5BA069BEC901000000000000000010000000F1BB45467D72B44F822E9686F1D18ED4maemomaemo@test.localmeetingroomtest@test.localmeetingroom testi03maemo@test.localmaemo01meetingroom testi20090417T120000Z2365<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Generator" content="Microsoft Exchange Server"> <!-- converted from text --> <style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> <body> <font size="2"><div class="PlainText">&nbsp;</div></font> </body> </html>00015510-119 \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.compact.xml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.compact.xml new file mode 100644 index 0000000..6e445f5 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.compact.xml @@ -0,0 +1,15 @@ +11CalendarRgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksUAAAP3iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w==20090417T112208Z20090417T090000Zhfjjf040000008200E00074C5B7101A82E00800000000F4BD10E469BEC901000000000000000010000000449579D4A72EED4EB3F70D04913F0277maemomaemo@test.localmaemo@test.localmaemo01meetingroom testi20090417T100000Z2365<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html>0001551CalendarRgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksSAAAP3iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w==20090417T105620Z20090417T110000Ztent040000008200E00074C5B7101A82E008000000002E1A5BA069BEC901000000000000000010000000F1BB45467D72B44F822E9686F1D18ED4maemomaemo@test.localmeetingroomtest@test.localmeetingroom testi03maemo@test.localmaemo01meetingroom testi20090417T120000Z2365<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html>00015510-119 \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.indent2.xml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.indent2.xml new file mode 100644 index 0000000..d29d825 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.indent2.xml @@ -0,0 +1,102 @@ + + + + 1 + + + 1 + + Calendar + RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksUAAAP + 3 + + iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== + 20090417T112208Z + 20090417T090000Z + hfjjf + 040000008200E00074C5B7101A82E00800000000F4BD10E469BEC901000000000000000010000000449579D4A72EED4EB3F70D04913F0277 + maemo + maemo@test.local + + + maemo@test.local + maemo + 0 + 1 + + + meetingroom testi + 20090417T100000Z + + 2 + 365 + <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + + 0 + 0 + 0 + 15 + 5 + 1 + + + + Calendar + RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksSAAAP + 3 + + iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== + 20090417T105620Z + 20090417T110000Z + tent + 040000008200E00074C5B7101A82E008000000002E1A5BA069BEC901000000000000000010000000F1BB45467D72B44F822E9686F1D18ED4 + maemo + maemo@test.local + + + meetingroomtest@test.local + meetingroom testi + 0 + 3 + + + maemo@test.local + maemo + 0 + 1 + + + meetingroom testi + 20090417T120000Z + + 2 + 365 + <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + + 0 + 0 + 0 + 15 + 5 + 1 + + + 0-1 + 19 + + + diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.xml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.xml new file mode 100644 index 0000000..2bce01b --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.wbxml.xml @@ -0,0 +1,102 @@ + + + +1 + + +1 + +Calendar +RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksUAAAP +3 + +iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== +20090417T112208Z +20090417T090000Z +hfjjf +040000008200E00074C5B7101A82E00800000000F4BD10E469BEC901000000000000000010000000449579D4A72EED4EB3F70D04913F0277 +maemo +maemo@test.local + + +maemo@test.local +maemo +0 +1 + + +meetingroom testi +20090417T100000Z + +2 +365 +<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + +0 +0 +0 +15 +5 +1 + + + +Calendar +RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksSAAAP +3 + +iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== +20090417T105620Z +20090417T110000Z +tent +040000008200E00074C5B7101A82E008000000002E1A5BA069BEC901000000000000000010000000F1BB45467D72B44F822E9686F1D18ED4 +maemo +maemo@test.local + + +meetingroomtest@test.local +meetingroom testi +0 +3 + + +maemo@test.local +maemo +0 +1 + + +meetingroom testi +20090417T120000Z + +2 +365 +<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + +0 +0 +0 +15 +5 +1 + + +0-1 +19 + + + diff --git a/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.xml b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.xml new file mode 100644 index 0000000..2da32b4 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.xml @@ -0,0 +1,102 @@ + + + + 1 + + + 1 + + Calendar + RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksUAAAP + 3 + + iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== + 20090417T112208Z + 20090417T090000Z + hfjjf + 040000008200E00074C5B7101A82E00800000000F4BD10E469BEC901000000000000000010000000449579D4A72EED4EB3F70D04913F0277 + maemo + maemo@test.local + + + maemo@test.local + maemo + 0 + 1 + + + meetingroom testi + 20090417T100000Z + + 2 + 365 + <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + + 0 + 0 + 0 + 15 + 5 + 1 + + + + Calendar + RgAAAADi22n%2b5K6eSoH%2bdzl9mrUlBwAiJdrFeosuS5FQPukoeMhpAH7xbHCsAAAiJdrFeosuS5FQPukoeMhpAH7zrksSAAAP + 3 + + iP///0YATABFACAAUwB0AGEAbgBkAGEAcgBkACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAFAAQAAAAAAAAAAAAAAEYATABFACAARABhAHkAbABpAGcAaAB0ACAAVABpAG0AZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAMAAAAAAAAAxP///w== + 20090417T105620Z + 20090417T110000Z + tent + 040000008200E00074C5B7101A82E008000000002E1A5BA069BEC901000000000000000010000000F1BB45467D72B44F822E9686F1D18ED4 + maemo + maemo@test.local + + + meetingroomtest@test.local + meetingroom testi + 0 + 3 + + + maemo@test.local + maemo + 0 + 1 + + + meetingroom testi + 20090417T120000Z + + 2 + 365 + <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="Generator" content="Microsoft Exchange Server"> +<!-- converted from text --> +<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head> +<body> +<font size="2"><div class="PlainText">&nbsp;</div></font> +</body> +</html> + + 0 + 0 + 0 + 15 + 5 + 1 + + + 0-1 + 19 + + + diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.anon.wbxml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.anon.wbxml new file mode 100644 index 0000000..4f5a3e3 Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.anon.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.anon.wbxml.xml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.anon.wbxml.xml new file mode 100644 index 0000000..93c34ef --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.anon.wbxml.xml @@ -0,0 +1,42 @@ + + + + + +16668481 +14 +1 + + +14:4 + +"Moti" <moti@example.com> +"Momo" <momo@example.org> +Hello world! +"Momo" <momo@example.org> +2010-12-28T22:30:09.906Z +Moti +Hello world! +1 +1 + +2 +8224 +1 +Bla bla bla +Guten tag + +IPM.Note +28591 + +urn:content-classes:message +2 +bdpgj2qneuaae+o81xg/bQ== +ACUM3SI= + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.nostrtbl.wbxml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.nostrtbl.wbxml new file mode 100644 index 0000000..7798370 Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml new file mode 100644 index 0000000..586a42d Binary files /dev/null and b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml differ diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.canonical.xml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.canonical.xml new file mode 100644 index 0000000..0307407 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.canonical.xml @@ -0,0 +1 @@ +1666848114114:4"Moti" <moti@example.com>"Momo" <momo@example.org>Hello world!"Momo" <momo@example.org>2010-12-28T22:30:09.906ZMotiHello world!11282241Bla bla blaGuten tagIPM.Note28591urn:content-classes:message2bdpgj2qneuaae+o81xg/bQ==ACUM3SI= \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.compact.xml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.compact.xml new file mode 100644 index 0000000..0307407 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.compact.xml @@ -0,0 +1 @@ +1666848114114:4"Moti" <moti@example.com>"Momo" <momo@example.org>Hello world!"Momo" <momo@example.org>2010-12-28T22:30:09.906ZMotiHello world!11282241Bla bla blaGuten tagIPM.Note28591urn:content-classes:message2bdpgj2qneuaae+o81xg/bQ==ACUM3SI= \ No newline at end of file diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.indent2.xml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.indent2.xml new file mode 100644 index 0000000..d32a505 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.indent2.xml @@ -0,0 +1,42 @@ + + + + + + 16668481 + 14 + 1 + + + 14:4 + + "Moti" <moti@example.com> + "Momo" <momo@example.org> + Hello world! + "Momo" <momo@example.org> + 2010-12-28T22:30:09.906Z + Moti + Hello world! + 1 + 1 + + 2 + 8224 + 1 + Bla bla bla + Guten tag + + IPM.Note + 28591 + + urn:content-classes:message + 2 + bdpgj2qneuaae+o81xg/bQ== + ACUM3SI= + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.xml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.xml new file mode 100644 index 0000000..93c34ef --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.wbxml.xml @@ -0,0 +1,42 @@ + + + + + +16668481 +14 +1 + + +14:4 + +"Moti" <moti@example.com> +"Momo" <momo@example.org> +Hello world! +"Momo" <momo@example.org> +2010-12-28T22:30:09.906Z +Moti +Hello world! +1 +1 + +2 +8224 +1 +Bla bla bla +Guten tag + +IPM.Note +28591 + +urn:content-classes:message +2 +bdpgj2qneuaae+o81xg/bQ== +ACUM3SI= + + + + + + + diff --git a/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.xml b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.xml new file mode 100644 index 0000000..4ced458 --- /dev/null +++ b/test/fixtures/upstream/airsync/airsync-004-binary_byte_array.xml @@ -0,0 +1,43 @@ + + + + + + 16668481 + 14 + 1 + + + 14:4 + + "Moti" <moti@example.com> + "Momo" <momo@example.org> + Hello world! + "Momo" <momo@example.org> + 2010-12-28T22:30:09.906Z + Moti + Hello world! + 1 + 1 + + 2 + 8224 + 1 + Bla bla bla + Guten tag + + IPM.Note + 28591 + + urn:content-classes:message + 2 + + bdpgj2qneuaae+o81xg/bQ== + ACUM3SI= + + + + + + + diff --git a/test/fixtures/upstream/conml/conml-001.anon.wbxml b/test/fixtures/upstream/conml/conml-001.anon.wbxml new file mode 100644 index 0000000..fdaee74 Binary files /dev/null and b/test/fixtures/upstream/conml/conml-001.anon.wbxml differ diff --git a/test/fixtures/upstream/conml/conml-001.anon.wbxml.xml b/test/fixtures/upstream/conml/conml-001.anon.wbxml.xml new file mode 100644 index 0000000..bebfed5 --- /dev/null +++ b/test/fixtures/upstream/conml/conml-001.anon.wbxml.xml @@ -0,0 +1,10 @@ + + + + + +C:\Temp\MyApp + + + + diff --git a/test/fixtures/upstream/conml/conml-001.nostrtbl.wbxml b/test/fixtures/upstream/conml/conml-001.nostrtbl.wbxml new file mode 100644 index 0000000..fdaee74 Binary files /dev/null and b/test/fixtures/upstream/conml/conml-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/conml/conml-001.wbxml b/test/fixtures/upstream/conml/conml-001.wbxml new file mode 100644 index 0000000..fdaee74 Binary files /dev/null and b/test/fixtures/upstream/conml/conml-001.wbxml differ diff --git a/test/fixtures/upstream/conml/conml-001.wbxml.xml b/test/fixtures/upstream/conml/conml-001.wbxml.xml new file mode 100644 index 0000000..bebfed5 --- /dev/null +++ b/test/fixtures/upstream/conml/conml-001.wbxml.xml @@ -0,0 +1,10 @@ + + + + + +C:\Temp\MyApp + + + + diff --git a/test/fixtures/upstream/conml/conml-001.xml b/test/fixtures/upstream/conml/conml-001.xml new file mode 100644 index 0000000..b446698 --- /dev/null +++ b/test/fixtures/upstream/conml/conml-001.xml @@ -0,0 +1,16 @@ + + + + + + + + C:\Temp\MyApp + + + + + + diff --git a/test/fixtures/upstream/conml/conml-002.anon.wbxml b/test/fixtures/upstream/conml/conml-002.anon.wbxml new file mode 100644 index 0000000..6886a29 Binary files /dev/null and b/test/fixtures/upstream/conml/conml-002.anon.wbxml differ diff --git a/test/fixtures/upstream/conml/conml-002.anon.wbxml.xml b/test/fixtures/upstream/conml/conml-002.anon.wbxml.xml new file mode 100644 index 0000000..2add668 --- /dev/null +++ b/test/fixtures/upstream/conml/conml-002.anon.wbxml.xml @@ -0,0 +1,10 @@ + + + + + +C:\Data\Installs\helloworldbasic.sis + + + + diff --git a/test/fixtures/upstream/conml/conml-002.nostrtbl.wbxml b/test/fixtures/upstream/conml/conml-002.nostrtbl.wbxml new file mode 100644 index 0000000..6886a29 Binary files /dev/null and b/test/fixtures/upstream/conml/conml-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/conml/conml-002.wbxml b/test/fixtures/upstream/conml/conml-002.wbxml new file mode 100644 index 0000000..6886a29 Binary files /dev/null and b/test/fixtures/upstream/conml/conml-002.wbxml differ diff --git a/test/fixtures/upstream/conml/conml-002.wbxml.xml b/test/fixtures/upstream/conml/conml-002.wbxml.xml new file mode 100644 index 0000000..2add668 --- /dev/null +++ b/test/fixtures/upstream/conml/conml-002.wbxml.xml @@ -0,0 +1,10 @@ + + + + + +C:\Data\Installs\helloworldbasic.sis + + + + diff --git a/test/fixtures/upstream/conml/conml-002.xml b/test/fixtures/upstream/conml/conml-002.xml new file mode 100644 index 0000000..2418a3e --- /dev/null +++ b/test/fixtures/upstream/conml/conml-002.xml @@ -0,0 +1,11 @@ + + + + + + + C:\Data\Installs\helloworldbasic.sis + + + + diff --git a/test/fixtures/upstream/ddf/ddf-001.anon.wbxml b/test/fixtures/upstream/ddf/ddf-001.anon.wbxml new file mode 100644 index 0000000..7a1a960 Binary files /dev/null and b/test/fixtures/upstream/ddf/ddf-001.anon.wbxml differ diff --git a/test/fixtures/upstream/ddf/ddf-001.anon.wbxml.xml b/test/fixtures/upstream/ddf/ddf-001.anon.wbxml.xml new file mode 100644 index 0000000..331a557 --- /dev/null +++ b/test/fixtures/upstream/ddf/ddf-001.anon.wbxml.xml @@ -0,0 +1,55 @@ + + + +1.2 + +E-Mail + + + + + +com.operatorX.dm/1.0/EMail + + + +POP3 + +POPServer + + + + + +text/plain + + +mail.Operatorx.com + + +UserID + + + + + +text/plain + + +UserName + + +PWD + + + + + +text/plain + + +4571F7C34A9876B3 + + + + diff --git a/test/fixtures/upstream/ddf/ddf-001.ddf b/test/fixtures/upstream/ddf/ddf-001.ddf new file mode 100644 index 0000000..17c6000 --- /dev/null +++ b/test/fixtures/upstream/ddf/ddf-001.ddf @@ -0,0 +1,55 @@ + + + + 1.2 + + E-Mail + + + + + + com.operatorX.dm/1.0/EMail + + + + POP3 + + POPServer + + + + + + text/plain + + + mail.Operatorx.com + + + UserID + + + + + + text/plain + + + UserName + + + PWD + + + + + + text/plain + + + 4571F7C34A9876B3 + + + + diff --git a/test/fixtures/upstream/ddf/ddf-001.nostrtbl.wbxml b/test/fixtures/upstream/ddf/ddf-001.nostrtbl.wbxml new file mode 100644 index 0000000..8b77c4f Binary files /dev/null and b/test/fixtures/upstream/ddf/ddf-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/ddf/ddf-001.wbxml b/test/fixtures/upstream/ddf/ddf-001.wbxml new file mode 100644 index 0000000..d3cac44 Binary files /dev/null and b/test/fixtures/upstream/ddf/ddf-001.wbxml differ diff --git a/test/fixtures/upstream/ddf/ddf-001.wbxml.xml b/test/fixtures/upstream/ddf/ddf-001.wbxml.xml new file mode 100644 index 0000000..331a557 --- /dev/null +++ b/test/fixtures/upstream/ddf/ddf-001.wbxml.xml @@ -0,0 +1,55 @@ + + + +1.2 + +E-Mail + + + + + +com.operatorX.dm/1.0/EMail + + + +POP3 + +POPServer + + + + + +text/plain + + +mail.Operatorx.com + + +UserID + + + + + +text/plain + + +UserName + + +PWD + + + + + +text/plain + + +4571F7C34A9876B3 + + + + diff --git a/test/fixtures/upstream/ddf/syncml_with_ddf-001.anon.wbxml b/test/fixtures/upstream/ddf/syncml_with_ddf-001.anon.wbxml new file mode 100644 index 0000000..45d2d9d Binary files /dev/null and b/test/fixtures/upstream/ddf/syncml_with_ddf-001.anon.wbxml differ diff --git a/test/fixtures/upstream/ddf/syncml_with_ddf-001.anon.wbxml.xml b/test/fixtures/upstream/ddf/syncml_with_ddf-001.anon.wbxml.xml new file mode 100644 index 0000000..3bb3b71 --- /dev/null +++ b/test/fixtures/upstream/ddf/syncml_with_ddf-001.anon.wbxml.xml @@ -0,0 +1,144 @@ + + + + +1.2 +SyncML/1.2 +1 +2 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +2 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +200 + + +2 +2 +3 +Sync +./contacts/james_bond +./dev-contacts +200 + + +3 +2 +4 +Replace +1012 +200 + + +4 + +./dev-contacts + + +./contacts/james_bond + + +5 + +text/x-vcard + + + +1023 + + + + + +6 + +text/x-vcard + + + +10536681 + + + + + +4 + + +/OperatorX + + +xml +application/vnd.syncml.dmtnds+xml + + +1.2 + +E-Mail + + + + + +com.operatorX.dm/1.0/EMail + + + +POP3 + +POPServer + + + + + +text/plain + + +mail.Operatorx.com + + +UserID + + + + + +text/plain + + +UserName + + +PWD + + + + + +text/plain + + +4571F7C34A9876B3 + + + + + + + + + + + diff --git a/test/fixtures/upstream/ddf/syncml_with_ddf-001.nostrtbl.wbxml b/test/fixtures/upstream/ddf/syncml_with_ddf-001.nostrtbl.wbxml new file mode 100644 index 0000000..d3a9a08 Binary files /dev/null and b/test/fixtures/upstream/ddf/syncml_with_ddf-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/ddf/syncml_with_ddf-001.wbxml b/test/fixtures/upstream/ddf/syncml_with_ddf-001.wbxml new file mode 100644 index 0000000..45d2d9d Binary files /dev/null and b/test/fixtures/upstream/ddf/syncml_with_ddf-001.wbxml differ diff --git a/test/fixtures/upstream/ddf/syncml_with_ddf-001.wbxml.xml b/test/fixtures/upstream/ddf/syncml_with_ddf-001.wbxml.xml new file mode 100644 index 0000000..3bb3b71 --- /dev/null +++ b/test/fixtures/upstream/ddf/syncml_with_ddf-001.wbxml.xml @@ -0,0 +1,144 @@ + + + + +1.2 +SyncML/1.2 +1 +2 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +2 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +200 + + +2 +2 +3 +Sync +./contacts/james_bond +./dev-contacts +200 + + +3 +2 +4 +Replace +1012 +200 + + +4 + +./dev-contacts + + +./contacts/james_bond + + +5 + +text/x-vcard + + + +1023 + + + + + +6 + +text/x-vcard + + + +10536681 + + + + + +4 + + +/OperatorX + + +xml +application/vnd.syncml.dmtnds+xml + + +1.2 + +E-Mail + + + + + +com.operatorX.dm/1.0/EMail + + + +POP3 + +POPServer + + + + + +text/plain + + +mail.Operatorx.com + + +UserID + + + + + +text/plain + + +UserName + + +PWD + + + + + +text/plain + + +4571F7C34A9876B3 + + + + + + + + + + + diff --git a/test/fixtures/upstream/ddf/syncml_with_ddf-001.xml b/test/fixtures/upstream/ddf/syncml_with_ddf-001.xml new file mode 100644 index 0000000..edfddf5 --- /dev/null +++ b/test/fixtures/upstream/ddf/syncml_with_ddf-001.xml @@ -0,0 +1,153 @@ + + + + + 1.2 + SyncML/1.2 + 1 + 2 + + IMEI:493005100592800 + + + http://www.syncml.org/sync-server + + + + + 1 + 2 + 0 + SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 200 + + + + 2 + 2 + 3 + Sync + ./contacts/james_bond + ./dev-contacts + 200 + + + + 3 + 2 + 4 + Replace + 1012 + 200 + + + + 4 + + ./dev-contacts + + + ./contacts/james_bond + + + 5 + + text/x-vcard + + + + 1023 + + + + + + + 6 + + text/x-vcard + + + + 10536681 + + + + + + + + 4 + + + /OperatorX + + + xml + + application/vnd.syncml.dmtnds+xml + + + + + 1.2 + + E-Mail + + + + + + com.operatorX.dm/1.0/EMail + + + + POP3 + + POPServer + + + + + + text/plain + + + mail.Operatorx.com + + + UserID + + + + + + text/plain + + + UserName + + + PWD + + + + + + text/plain + + + 4571F7C34A9876B3 + + + + + + + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-001.anon.wbxml b/test/fixtures/upstream/drmrel/drmrel-001.anon.wbxml new file mode 100644 index 0000000..95011dd Binary files /dev/null and b/test/fixtures/upstream/drmrel/drmrel-001.anon.wbxml differ diff --git a/test/fixtures/upstream/drmrel/drmrel-001.anon.wbxml.xml b/test/fixtures/upstream/drmrel/drmrel-001.anon.wbxml.xml new file mode 100644 index 0000000..a8ecbca --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-001.anon.wbxml.xml @@ -0,0 +1,17 @@ + + + + +1.0 + + + + +cid:4567829547@foo.com + + + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-001.wbxml b/test/fixtures/upstream/drmrel/drmrel-001.wbxml new file mode 100644 index 0000000..95011dd Binary files /dev/null and b/test/fixtures/upstream/drmrel/drmrel-001.wbxml differ diff --git a/test/fixtures/upstream/drmrel/drmrel-001.wbxml.xml b/test/fixtures/upstream/drmrel/drmrel-001.wbxml.xml new file mode 100644 index 0000000..a8ecbca --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-001.wbxml.xml @@ -0,0 +1,17 @@ + + + + +1.0 + + + + +cid:4567829547@foo.com + + + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-001.xml b/test/fixtures/upstream/drmrel/drmrel-001.xml new file mode 100644 index 0000000..4a85ab2 --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-001.xml @@ -0,0 +1,17 @@ + + + + + 1.0 + + + + + cid:4567829547@foo.com + + + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-002.anon.wbxml b/test/fixtures/upstream/drmrel/drmrel-002.anon.wbxml new file mode 100644 index 0000000..5d713bd Binary files /dev/null and b/test/fixtures/upstream/drmrel/drmrel-002.anon.wbxml differ diff --git a/test/fixtures/upstream/drmrel/drmrel-002.anon.wbxml.xml b/test/fixtures/upstream/drmrel/drmrel-002.anon.wbxml.xml new file mode 100644 index 0000000..e8d7ae9 --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-002.anon.wbxml.xml @@ -0,0 +1,20 @@ + + + + +1.0 + + + + +cid:4567829547@foo.com + + +Cei4QxjWo9Kg8D3pKgxw= + + + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-002.wbxml b/test/fixtures/upstream/drmrel/drmrel-002.wbxml new file mode 100644 index 0000000..5d713bd Binary files /dev/null and b/test/fixtures/upstream/drmrel/drmrel-002.wbxml differ diff --git a/test/fixtures/upstream/drmrel/drmrel-002.wbxml.xml b/test/fixtures/upstream/drmrel/drmrel-002.wbxml.xml new file mode 100644 index 0000000..e8d7ae9 --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-002.wbxml.xml @@ -0,0 +1,20 @@ + + + + +1.0 + + + + +cid:4567829547@foo.com + + +Cei4QxjWo9Kg8D3pKgxw= + + + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-002.xml b/test/fixtures/upstream/drmrel/drmrel-002.xml new file mode 100644 index 0000000..a9cb91b --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-002.xml @@ -0,0 +1,20 @@ + + + + + 1.0 + + + + + cid:4567829547@foo.com + + + Cei4QxjWo9Kg8D3pKgxw= + + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/drmrel/drmrel-003.anon.wbxml b/test/fixtures/upstream/drmrel/drmrel-003.anon.wbxml new file mode 100644 index 0000000..47ff903 Binary files /dev/null and b/test/fixtures/upstream/drmrel/drmrel-003.anon.wbxml differ diff --git a/test/fixtures/upstream/drmrel/drmrel-003.anon.wbxml.xml b/test/fixtures/upstream/drmrel/drmrel-003.anon.wbxml.xml new file mode 100644 index 0000000..a3780db --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-003.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + +1.0 + + + + +cid:4567829547@foo.com + + +Cei4QxjWo9Kg8D3pKgxw= + + + + + +1 + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-003.wbxml b/test/fixtures/upstream/drmrel/drmrel-003.wbxml new file mode 100644 index 0000000..47ff903 Binary files /dev/null and b/test/fixtures/upstream/drmrel/drmrel-003.wbxml differ diff --git a/test/fixtures/upstream/drmrel/drmrel-003.wbxml.xml b/test/fixtures/upstream/drmrel/drmrel-003.wbxml.xml new file mode 100644 index 0000000..a3780db --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-003.wbxml.xml @@ -0,0 +1,24 @@ + + + + +1.0 + + + + +cid:4567829547@foo.com + + +Cei4QxjWo9Kg8D3pKgxw= + + + + + +1 + + + + + diff --git a/test/fixtures/upstream/drmrel/drmrel-003.xml b/test/fixtures/upstream/drmrel/drmrel-003.xml new file mode 100644 index 0000000..601ca1a --- /dev/null +++ b/test/fixtures/upstream/drmrel/drmrel-003.xml @@ -0,0 +1,24 @@ + + + + + 1.0 + + + + + cid:4567829547@foo.com + + + Cei4QxjWo9Kg8D3pKgxw= + + + + + + 1 + + + + + diff --git a/test/fixtures/upstream/emn/emn-001.anon.wbxml b/test/fixtures/upstream/emn/emn-001.anon.wbxml new file mode 100644 index 0000000..cb7972f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-001.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-001.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-001.anon.wbxml.xml new file mode 100644 index 0000000..7eebca7 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-001.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-001.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-001.nostrtbl.wbxml new file mode 100644 index 0000000..cb7972f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-001.wbxml b/test/fixtures/upstream/emn/emn-001.wbxml new file mode 100644 index 0000000..cb7972f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-001.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-001.wbxml.xml b/test/fixtures/upstream/emn/emn-001.wbxml.xml new file mode 100644 index 0000000..7eebca7 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-001.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-001.xml b/test/fixtures/upstream/emn/emn-001.xml new file mode 100644 index 0000000..0935fab --- /dev/null +++ b/test/fixtures/upstream/emn/emn-001.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-002.anon.wbxml b/test/fixtures/upstream/emn/emn-002.anon.wbxml new file mode 100644 index 0000000..b784772 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-002.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-002.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-002.anon.wbxml.xml new file mode 100644 index 0000000..1e22c2c --- /dev/null +++ b/test/fixtures/upstream/emn/emn-002.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-002.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-002.nostrtbl.wbxml new file mode 100644 index 0000000..b784772 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-002.wbxml b/test/fixtures/upstream/emn/emn-002.wbxml new file mode 100644 index 0000000..b784772 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-002.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-002.wbxml.xml b/test/fixtures/upstream/emn/emn-002.wbxml.xml new file mode 100644 index 0000000..1e22c2c --- /dev/null +++ b/test/fixtures/upstream/emn/emn-002.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-002.xml b/test/fixtures/upstream/emn/emn-002.xml new file mode 100644 index 0000000..d259a4c --- /dev/null +++ b/test/fixtures/upstream/emn/emn-002.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-003.anon.wbxml b/test/fixtures/upstream/emn/emn-003.anon.wbxml new file mode 100644 index 0000000..63c3c9a Binary files /dev/null and b/test/fixtures/upstream/emn/emn-003.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-003.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-003.anon.wbxml.xml new file mode 100644 index 0000000..2802d52 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-003.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-003.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-003.nostrtbl.wbxml new file mode 100644 index 0000000..63c3c9a Binary files /dev/null and b/test/fixtures/upstream/emn/emn-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-003.wbxml b/test/fixtures/upstream/emn/emn-003.wbxml new file mode 100644 index 0000000..63c3c9a Binary files /dev/null and b/test/fixtures/upstream/emn/emn-003.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-003.wbxml.xml b/test/fixtures/upstream/emn/emn-003.wbxml.xml new file mode 100644 index 0000000..2802d52 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-003.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-003.xml b/test/fixtures/upstream/emn/emn-003.xml new file mode 100644 index 0000000..076666d --- /dev/null +++ b/test/fixtures/upstream/emn/emn-003.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-004.anon.wbxml b/test/fixtures/upstream/emn/emn-004.anon.wbxml new file mode 100644 index 0000000..9412c44 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-004.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-004.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-004.anon.wbxml.xml new file mode 100644 index 0000000..f022b62 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-004.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-004.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-004.nostrtbl.wbxml new file mode 100644 index 0000000..9412c44 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-004.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-004.wbxml b/test/fixtures/upstream/emn/emn-004.wbxml new file mode 100644 index 0000000..9412c44 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-004.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-004.wbxml.xml b/test/fixtures/upstream/emn/emn-004.wbxml.xml new file mode 100644 index 0000000..f022b62 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-004.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-004.xml b/test/fixtures/upstream/emn/emn-004.xml new file mode 100644 index 0000000..09a258f --- /dev/null +++ b/test/fixtures/upstream/emn/emn-004.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-005.anon.wbxml b/test/fixtures/upstream/emn/emn-005.anon.wbxml new file mode 100644 index 0000000..7c34fbd Binary files /dev/null and b/test/fixtures/upstream/emn/emn-005.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-005.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-005.anon.wbxml.xml new file mode 100644 index 0000000..ab591d7 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-005.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-005.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-005.nostrtbl.wbxml new file mode 100644 index 0000000..7c34fbd Binary files /dev/null and b/test/fixtures/upstream/emn/emn-005.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-005.wbxml b/test/fixtures/upstream/emn/emn-005.wbxml new file mode 100644 index 0000000..7c34fbd Binary files /dev/null and b/test/fixtures/upstream/emn/emn-005.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-005.wbxml.xml b/test/fixtures/upstream/emn/emn-005.wbxml.xml new file mode 100644 index 0000000..ab591d7 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-005.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-005.xml b/test/fixtures/upstream/emn/emn-005.xml new file mode 100644 index 0000000..251fef4 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-005.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-006.anon.wbxml b/test/fixtures/upstream/emn/emn-006.anon.wbxml new file mode 100644 index 0000000..2652d24 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-006.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-006.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-006.anon.wbxml.xml new file mode 100644 index 0000000..5f52102 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-006.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-006.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-006.nostrtbl.wbxml new file mode 100644 index 0000000..2652d24 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-006.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-006.wbxml b/test/fixtures/upstream/emn/emn-006.wbxml new file mode 100644 index 0000000..2652d24 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-006.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-006.wbxml.xml b/test/fixtures/upstream/emn/emn-006.wbxml.xml new file mode 100644 index 0000000..5f52102 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-006.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-006.xml b/test/fixtures/upstream/emn/emn-006.xml new file mode 100644 index 0000000..8b1540f --- /dev/null +++ b/test/fixtures/upstream/emn/emn-006.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-007.anon.wbxml b/test/fixtures/upstream/emn/emn-007.anon.wbxml new file mode 100644 index 0000000..3ad25a7 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-007.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-007.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-007.anon.wbxml.xml new file mode 100644 index 0000000..ea82c55 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-007.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-007.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-007.nostrtbl.wbxml new file mode 100644 index 0000000..3ad25a7 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-007.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-007.wbxml b/test/fixtures/upstream/emn/emn-007.wbxml new file mode 100644 index 0000000..3ad25a7 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-007.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-007.wbxml.xml b/test/fixtures/upstream/emn/emn-007.wbxml.xml new file mode 100644 index 0000000..ea82c55 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-007.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-007.xml b/test/fixtures/upstream/emn/emn-007.xml new file mode 100644 index 0000000..faceff6 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-007.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-008.anon.wbxml b/test/fixtures/upstream/emn/emn-008.anon.wbxml new file mode 100644 index 0000000..b677ed2 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-008.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-008.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-008.anon.wbxml.xml new file mode 100644 index 0000000..2b78b78 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-008.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-008.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-008.nostrtbl.wbxml new file mode 100644 index 0000000..b677ed2 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-008.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-008.wbxml b/test/fixtures/upstream/emn/emn-008.wbxml new file mode 100644 index 0000000..b677ed2 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-008.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-008.wbxml.xml b/test/fixtures/upstream/emn/emn-008.wbxml.xml new file mode 100644 index 0000000..2b78b78 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-008.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-008.xml b/test/fixtures/upstream/emn/emn-008.xml new file mode 100644 index 0000000..8eabc96 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-008.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-009.anon.wbxml b/test/fixtures/upstream/emn/emn-009.anon.wbxml new file mode 100644 index 0000000..58f61a0 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-009.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-009.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-009.anon.wbxml.xml new file mode 100644 index 0000000..2c5f67d --- /dev/null +++ b/test/fixtures/upstream/emn/emn-009.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-009.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-009.nostrtbl.wbxml new file mode 100644 index 0000000..58f61a0 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-009.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-009.wbxml b/test/fixtures/upstream/emn/emn-009.wbxml new file mode 100644 index 0000000..58f61a0 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-009.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-009.wbxml.xml b/test/fixtures/upstream/emn/emn-009.wbxml.xml new file mode 100644 index 0000000..2c5f67d --- /dev/null +++ b/test/fixtures/upstream/emn/emn-009.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-009.xml b/test/fixtures/upstream/emn/emn-009.xml new file mode 100644 index 0000000..f424e8f --- /dev/null +++ b/test/fixtures/upstream/emn/emn-009.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-010.anon.wbxml b/test/fixtures/upstream/emn/emn-010.anon.wbxml new file mode 100644 index 0000000..a29d220 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-010.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-010.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-010.anon.wbxml.xml new file mode 100644 index 0000000..d53b9cb --- /dev/null +++ b/test/fixtures/upstream/emn/emn-010.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-010.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-010.nostrtbl.wbxml new file mode 100644 index 0000000..a29d220 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-010.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-010.wbxml b/test/fixtures/upstream/emn/emn-010.wbxml new file mode 100644 index 0000000..a29d220 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-010.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-010.wbxml.xml b/test/fixtures/upstream/emn/emn-010.wbxml.xml new file mode 100644 index 0000000..d53b9cb --- /dev/null +++ b/test/fixtures/upstream/emn/emn-010.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-010.xml b/test/fixtures/upstream/emn/emn-010.xml new file mode 100644 index 0000000..d366581 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-010.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-011.anon.wbxml b/test/fixtures/upstream/emn/emn-011.anon.wbxml new file mode 100644 index 0000000..dffbe36 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-011.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-011.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-011.anon.wbxml.xml new file mode 100644 index 0000000..7a596cc --- /dev/null +++ b/test/fixtures/upstream/emn/emn-011.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-011.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-011.nostrtbl.wbxml new file mode 100644 index 0000000..dffbe36 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-011.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-011.wbxml b/test/fixtures/upstream/emn/emn-011.wbxml new file mode 100644 index 0000000..dffbe36 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-011.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-011.wbxml.xml b/test/fixtures/upstream/emn/emn-011.wbxml.xml new file mode 100644 index 0000000..7a596cc --- /dev/null +++ b/test/fixtures/upstream/emn/emn-011.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-011.xml b/test/fixtures/upstream/emn/emn-011.xml new file mode 100644 index 0000000..0661d65 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-011.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-012.anon.wbxml b/test/fixtures/upstream/emn/emn-012.anon.wbxml new file mode 100644 index 0000000..870b04e Binary files /dev/null and b/test/fixtures/upstream/emn/emn-012.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-012.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-012.anon.wbxml.xml new file mode 100644 index 0000000..bfd94a2 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-012.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-012.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-012.nostrtbl.wbxml new file mode 100644 index 0000000..870b04e Binary files /dev/null and b/test/fixtures/upstream/emn/emn-012.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-012.wbxml b/test/fixtures/upstream/emn/emn-012.wbxml new file mode 100644 index 0000000..870b04e Binary files /dev/null and b/test/fixtures/upstream/emn/emn-012.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-012.wbxml.xml b/test/fixtures/upstream/emn/emn-012.wbxml.xml new file mode 100644 index 0000000..bfd94a2 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-012.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-012.xml b/test/fixtures/upstream/emn/emn-012.xml new file mode 100644 index 0000000..446f306 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-012.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-013.anon.wbxml b/test/fixtures/upstream/emn/emn-013.anon.wbxml new file mode 100644 index 0000000..1fc516f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-013.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-013.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-013.anon.wbxml.xml new file mode 100644 index 0000000..9eeb606 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-013.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-013.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-013.nostrtbl.wbxml new file mode 100644 index 0000000..1fc516f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-013.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-013.wbxml b/test/fixtures/upstream/emn/emn-013.wbxml new file mode 100644 index 0000000..1fc516f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-013.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-013.wbxml.xml b/test/fixtures/upstream/emn/emn-013.wbxml.xml new file mode 100644 index 0000000..9eeb606 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-013.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-013.xml b/test/fixtures/upstream/emn/emn-013.xml new file mode 100644 index 0000000..fe00e0b --- /dev/null +++ b/test/fixtures/upstream/emn/emn-013.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-014.anon.wbxml b/test/fixtures/upstream/emn/emn-014.anon.wbxml new file mode 100644 index 0000000..cb7972f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-014.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-014.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-014.anon.wbxml.xml new file mode 100644 index 0000000..7eebca7 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-014.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-014.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-014.nostrtbl.wbxml new file mode 100644 index 0000000..cb7972f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-014.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-014.wbxml b/test/fixtures/upstream/emn/emn-014.wbxml new file mode 100644 index 0000000..cb7972f Binary files /dev/null and b/test/fixtures/upstream/emn/emn-014.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-014.wbxml.xml b/test/fixtures/upstream/emn/emn-014.wbxml.xml new file mode 100644 index 0000000..7eebca7 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-014.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-014.xml b/test/fixtures/upstream/emn/emn-014.xml new file mode 100644 index 0000000..0935fab --- /dev/null +++ b/test/fixtures/upstream/emn/emn-014.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-015.anon.wbxml b/test/fixtures/upstream/emn/emn-015.anon.wbxml new file mode 100644 index 0000000..20b63d1 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-015.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-015.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-015.anon.wbxml.xml new file mode 100644 index 0000000..24e9d82 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-015.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-015.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-015.nostrtbl.wbxml new file mode 100644 index 0000000..20b63d1 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-015.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-015.wbxml b/test/fixtures/upstream/emn/emn-015.wbxml new file mode 100644 index 0000000..20b63d1 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-015.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-015.wbxml.xml b/test/fixtures/upstream/emn/emn-015.wbxml.xml new file mode 100644 index 0000000..24e9d82 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-015.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-015.xml b/test/fixtures/upstream/emn/emn-015.xml new file mode 100644 index 0000000..1108921 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-015.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-016.anon.wbxml b/test/fixtures/upstream/emn/emn-016.anon.wbxml new file mode 100644 index 0000000..de485f7 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-016.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-016.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-016.anon.wbxml.xml new file mode 100644 index 0000000..7ff1e46 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-016.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-016.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-016.nostrtbl.wbxml new file mode 100644 index 0000000..de485f7 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-016.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-016.wbxml b/test/fixtures/upstream/emn/emn-016.wbxml new file mode 100644 index 0000000..de485f7 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-016.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-016.wbxml.xml b/test/fixtures/upstream/emn/emn-016.wbxml.xml new file mode 100644 index 0000000..7ff1e46 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-016.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-016.xml b/test/fixtures/upstream/emn/emn-016.xml new file mode 100644 index 0000000..be86be1 --- /dev/null +++ b/test/fixtures/upstream/emn/emn-016.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/emn/emn-017.anon.wbxml b/test/fixtures/upstream/emn/emn-017.anon.wbxml new file mode 100644 index 0000000..3d09b25 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-017.anon.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-017.anon.wbxml.xml b/test/fixtures/upstream/emn/emn-017.anon.wbxml.xml new file mode 100644 index 0000000..d846d0f --- /dev/null +++ b/test/fixtures/upstream/emn/emn-017.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-017.nostrtbl.wbxml b/test/fixtures/upstream/emn/emn-017.nostrtbl.wbxml new file mode 100644 index 0000000..3d09b25 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-017.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-017.wbxml b/test/fixtures/upstream/emn/emn-017.wbxml new file mode 100644 index 0000000..3d09b25 Binary files /dev/null and b/test/fixtures/upstream/emn/emn-017.wbxml differ diff --git a/test/fixtures/upstream/emn/emn-017.wbxml.xml b/test/fixtures/upstream/emn/emn-017.wbxml.xml new file mode 100644 index 0000000..d846d0f --- /dev/null +++ b/test/fixtures/upstream/emn/emn-017.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/emn/emn-017.xml b/test/fixtures/upstream/emn/emn-017.xml new file mode 100644 index 0000000..07c582f --- /dev/null +++ b/test/fixtures/upstream/emn/emn-017.xml @@ -0,0 +1,4 @@ + + + + diff --git a/test/fixtures/upstream/manifest.exs b/test/fixtures/upstream/manifest.exs new file mode 100644 index 0000000..5584b5e --- /dev/null +++ b/test/fixtures/upstream/manifest.exs @@ -0,0 +1,3371 @@ +# Generated once from the upstream C reference tools (xml2wbxml / wbxml2xml, +# libwbxml 0.11.10, commit e58b1f19f11dbadff53e5b486b8c4b16639a656a) together +# with the golden files it describes. Both are frozen -- DO NOT EDIT BY HAND. +# +# One entry per fixture. Keys are `"/"` for the vendored upstream +# documents (relative to test/fixtures/upstream/) and `""` for the +# project fixtures in test/fixtures/; `:path` is the input path relative to the +# repository root. Golden files live next to the input, named +# `.wbxml`, `.nostrtbl.wbxml`, `.anon.wbxml`, `.wbxml.xml`, +# `.anon.wbxml.xml`, `.wbxml.compact.xml`, `.wbxml.canonical.xml` +# and `.wbxml.indent2.xml`. +# +# Fields: +# :language language atom detected from the document's DOCTYPE / root +# :lang_flag the `-l` spelling used with wbxml2xml for that language +# :detection :doctype (public/system ID) or :root_element (no usable DOCTYPE) +# :decode_lang_flag whether `.wbxml.xml` / `.wbxml.*.xml` were decoded with +# `-l ` (true only for ota, airsync and *.ddf, as +# in upstream launchTests.sh); `.anon.wbxml.xml` always is. +# :wbxml, :nostrtbl, :anon, :wbxml_xml, :anon_wbxml_xml, :compact, :canonical, :indent2 +# :ok -> the golden file exists +# {:error, message} -> the tool failed with that message and no +# file was written +# :skipped -> variant not generated for this directory +%{ + "activesync/activesync-001-settings_device_information.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-001-settings_device_information.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-002-settings_user_information.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-002-settings_user_information.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-003-settings_device_password.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-003-settings_device_password.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-004-settings_oof.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-004-settings_oof.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-005-settings_status.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-005-settings_status.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-010-provision-eas.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-010-provision-eas.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-011-provision-wap.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-011-provision-wap.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-012-provision-eas.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-012-provision-eas.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-020-folder_sync_initial_request.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-020-folder_sync_initial_request.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-021-folder_sync_initial_response.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-021-folder_sync_initial_response.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-030-sendmail-request.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-030-sendmail-request.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-031-sendmail-request.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-031-sendmail-request.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-032-formatted-base64.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-032-formatted-base64.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "activesync/activesync-040-search-response.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/upstream/activesync/activesync-040-search-response.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "airsync/airsync-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: true, + detection: :doctype, + indent2: :ok, + lang_flag: "AIRSYNC", + language: :airsync, + nostrtbl: :ok, + path: "test/fixtures/upstream/airsync/airsync-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "airsync/airsync-002-search_query_for_exchange.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: true, + detection: :doctype, + indent2: :ok, + lang_flag: "AIRSYNC", + language: :airsync, + nostrtbl: :ok, + path: "test/fixtures/upstream/airsync/airsync-002-search_query_for_exchange.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "airsync/airsync-003-search_response_from_exchange.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: true, + detection: :doctype, + indent2: :ok, + lang_flag: "AIRSYNC", + language: :airsync, + nostrtbl: :ok, + path: "test/fixtures/upstream/airsync/airsync-003-search_response_from_exchange.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "airsync/airsync-004-binary_byte_array.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: true, + detection: :doctype, + indent2: :ok, + lang_flag: "AIRSYNC", + language: :airsync, + nostrtbl: :ok, + path: "test/fixtures/upstream/airsync/airsync-004-binary_byte_array.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "conml/conml-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CONML", + language: :conml, + nostrtbl: :ok, + path: "test/fixtures/upstream/conml/conml-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "conml/conml-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CONML", + language: :conml, + nostrtbl: :ok, + path: "test/fixtures/upstream/conml/conml-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "ddf/ddf-001.ddf" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: true, + detection: :doctype, + indent2: :skipped, + lang_flag: "DMDDF12", + language: :dmddf12, + nostrtbl: :ok, + path: "test/fixtures/upstream/ddf/ddf-001.ddf", + wbxml: :ok, + wbxml_xml: :ok + }, + "ddf/syncml_with_ddf-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SYNCML12", + language: :syncml12, + nostrtbl: :ok, + path: "test/fixtures/upstream/ddf/syncml_with_ddf-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "drmrel/drmrel-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "DRMREL10", + language: :drmrel10, + nostrtbl: {:error, "String Table generation disabled: can't encode Literal"}, + path: "test/fixtures/upstream/drmrel/drmrel-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "drmrel/drmrel-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "DRMREL10", + language: :drmrel10, + nostrtbl: {:error, "String Table generation disabled: can't encode Literal"}, + path: "test/fixtures/upstream/drmrel/drmrel-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "drmrel/drmrel-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "DRMREL10", + language: :drmrel10, + nostrtbl: {:error, "String Table generation disabled: can't encode Literal"}, + path: "test/fixtures/upstream/drmrel/drmrel-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-004.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-004.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-005.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-005.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-006.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-006.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-007.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-007.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-008.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-008.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-009.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-009.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-010.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-010.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-011.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-011.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-012.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-012.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-013.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-013.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-014.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-014.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-015.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-015.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-016.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-016.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "emn/emn-017.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "EMN10", + language: :emn10, + nostrtbl: :ok, + path: "test/fixtures/upstream/emn/emn-017.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "ota/ota-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: true, + detection: :doctype, + indent2: :skipped, + lang_flag: "OTA", + language: :ota_settings, + nostrtbl: :ok, + path: "test/fixtures/upstream/ota/ota-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "ota/ota-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: true, + detection: :doctype, + indent2: :skipped, + lang_flag: "OTA", + language: :ota_settings, + nostrtbl: :ok, + path: "test/fixtures/upstream/ota/ota-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "ota/ota-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: true, + detection: :doctype, + indent2: :skipped, + lang_flag: "OTA", + language: :ota_settings, + nostrtbl: :ok, + path: "test/fixtures/upstream/ota/ota-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "ping_status_1.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/ping_status_1.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-004.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-004.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-005.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-005.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-006.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-006.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-007.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-007.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "prov/prov-008.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "PROV10", + language: :prov10, + nostrtbl: :ok, + path: "test/fixtures/upstream/prov/prov-008.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-004.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-004.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-005.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-005.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-006.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-006.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-007.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-007.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-008.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-008.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-009.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-009.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-010.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-010.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-011.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-011.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-012.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-012.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-013.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-013.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-014.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-014.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-015.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-015.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-016.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-016.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-017.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-017.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-018.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-018.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-019.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-019.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-020.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-020.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-021.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-021.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-022.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-022.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-023.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-023.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-024.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-024.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "si/si-025.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SI10", + language: :si10, + nostrtbl: :ok, + path: "test/fixtures/upstream/si/si-025.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-004.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-004.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-005.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-005.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-006.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-006.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-007.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-007.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-008.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-008.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-009.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-009.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-010.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-010.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-011.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-011.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-012.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-012.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sl/sl-013.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "SL10", + language: :sl10, + nostrtbl: :ok, + path: "test/fixtures/upstream/sl/sl-013.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "sync_initial_no_events.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "ACTIVESYNC", + language: :activesync, + nostrtbl: :ok, + path: "test/fixtures/sync_initial_no_events.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-004.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-004.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-005.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-005.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-006.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-006.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-007.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-007.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-008.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-008.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-009.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-009.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-010.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-010.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-011.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "DEVINF11", + language: :devinf11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-011.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-012.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-012.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-013.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-013.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "syncml/syncml-014.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :ok, + compact: :ok, + decode_lang_flag: false, + detection: :doctype, + indent2: :ok, + lang_flag: "SYNCML11", + language: :syncml11, + nostrtbl: :ok, + path: "test/fixtures/upstream/syncml/syncml-014.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-001.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-001.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-002.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-002.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-003.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-003.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-004.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-004.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-005.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-005.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-006.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-006.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-007.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-007.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-008.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-008.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-009.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-009.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-010.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-010.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-011.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-011.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-012.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-012.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-013.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-013.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-014.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-014.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-015.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-015.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-016.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-016.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-017.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-017.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-018.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-018.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-019.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-019.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-020.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-020.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-021.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-021.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-022.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-022.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-023.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-023.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-024.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-024.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-025.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-025.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-026.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-026.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-027.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-027.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-028.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-028.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-029.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-029.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-030.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-030.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-031.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-031.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-032.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-032.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-033.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-033.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-034.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-034.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-035.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-035.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-036.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-036.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-037.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-037.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-038.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-038.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-039.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-039.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-040.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-040.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-041.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-041.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-042.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-042.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-043.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-043.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-044.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-044.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-045.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-045.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-046.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-046.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-047.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-047.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-048.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-048.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-049.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-049.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-050.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-050.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-051.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-051.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-052.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-052.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-053.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-053.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-054.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-054.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-055.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-055.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-056.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-056.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-057.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-057.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-058.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-058.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-059.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-059.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-060.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-060.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-061.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-061.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-062.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-062.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-063.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-063.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-064.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-064.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-065.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-065.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-066.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-066.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-067.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-067.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-068.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-068.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-069.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-069.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-070.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-070.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-071.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-071.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-072.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-072.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-073.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-073.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-074.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-074.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-075.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-075.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-076.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-076.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-077.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-077.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-078.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-078.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-079.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-079.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-080.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-080.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-081.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-081.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-082.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-082.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-083.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-083.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-084.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-084.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-085.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-085.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-086.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-086.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-087.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-087.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-088.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-088.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-089.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-089.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-090.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-090.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-091.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-091.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-092.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-092.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-093.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-093.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-094.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-094.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-095.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-095.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-096.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-096.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-097.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-097.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-098.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-098.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-099.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-099.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-100.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-100.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-101.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-101.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-102.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-102.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-103.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-103.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-104.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-104.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-105.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-105.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-106-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-106-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-107-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-107-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-108-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-108-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-109-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-109-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-110-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-110-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-111-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-111-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-112-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-112-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-113-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-113-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-114-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-114-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-115-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-115-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + }, + "wv/wv-116-datetime.xml" => %{ + anon: :ok, + anon_wbxml_xml: :ok, + canonical: :skipped, + compact: :skipped, + decode_lang_flag: false, + detection: :doctype, + indent2: :skipped, + lang_flag: "CSP11", + language: :wv_csp11, + nostrtbl: :ok, + path: "test/fixtures/upstream/wv/wv-116-datetime.xml", + wbxml: :ok, + wbxml_xml: :ok + } +} diff --git a/test/fixtures/upstream/ota/ota-001.anon.wbxml b/test/fixtures/upstream/ota/ota-001.anon.wbxml new file mode 100644 index 0000000..d3d9b2a Binary files /dev/null and b/test/fixtures/upstream/ota/ota-001.anon.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-001.anon.wbxml.xml b/test/fixtures/upstream/ota/ota-001.anon.wbxml.xml new file mode 100644 index 0000000..72c61b0 --- /dev/null +++ b/test/fixtures/upstream/ota/ota-001.anon.wbxml.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-001.nostrtbl.wbxml b/test/fixtures/upstream/ota/ota-001.nostrtbl.wbxml new file mode 100644 index 0000000..d3d9b2a Binary files /dev/null and b/test/fixtures/upstream/ota/ota-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-001.wbxml b/test/fixtures/upstream/ota/ota-001.wbxml new file mode 100644 index 0000000..d3d9b2a Binary files /dev/null and b/test/fixtures/upstream/ota/ota-001.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-001.wbxml.xml b/test/fixtures/upstream/ota/ota-001.wbxml.xml new file mode 100644 index 0000000..72c61b0 --- /dev/null +++ b/test/fixtures/upstream/ota/ota-001.wbxml.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-001.xml b/test/fixtures/upstream/ota/ota-001.xml new file mode 100644 index 0000000..bde32cb --- /dev/null +++ b/test/fixtures/upstream/ota/ota-001.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-002.anon.wbxml b/test/fixtures/upstream/ota/ota-002.anon.wbxml new file mode 100644 index 0000000..9c85fa3 Binary files /dev/null and b/test/fixtures/upstream/ota/ota-002.anon.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-002.anon.wbxml.xml b/test/fixtures/upstream/ota/ota-002.anon.wbxml.xml new file mode 100644 index 0000000..1e72d5f --- /dev/null +++ b/test/fixtures/upstream/ota/ota-002.anon.wbxml.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-002.nostrtbl.wbxml b/test/fixtures/upstream/ota/ota-002.nostrtbl.wbxml new file mode 100644 index 0000000..9c85fa3 Binary files /dev/null and b/test/fixtures/upstream/ota/ota-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-002.wbxml b/test/fixtures/upstream/ota/ota-002.wbxml new file mode 100644 index 0000000..9c85fa3 Binary files /dev/null and b/test/fixtures/upstream/ota/ota-002.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-002.wbxml.xml b/test/fixtures/upstream/ota/ota-002.wbxml.xml new file mode 100644 index 0000000..1e72d5f --- /dev/null +++ b/test/fixtures/upstream/ota/ota-002.wbxml.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-002.xml b/test/fixtures/upstream/ota/ota-002.xml new file mode 100644 index 0000000..896fd45 --- /dev/null +++ b/test/fixtures/upstream/ota/ota-002.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-003.anon.wbxml b/test/fixtures/upstream/ota/ota-003.anon.wbxml new file mode 100644 index 0000000..c51597c Binary files /dev/null and b/test/fixtures/upstream/ota/ota-003.anon.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-003.anon.wbxml.xml b/test/fixtures/upstream/ota/ota-003.anon.wbxml.xml new file mode 100644 index 0000000..0dcb25f --- /dev/null +++ b/test/fixtures/upstream/ota/ota-003.anon.wbxml.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-003.nostrtbl.wbxml b/test/fixtures/upstream/ota/ota-003.nostrtbl.wbxml new file mode 100644 index 0000000..c51597c Binary files /dev/null and b/test/fixtures/upstream/ota/ota-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-003.wbxml b/test/fixtures/upstream/ota/ota-003.wbxml new file mode 100644 index 0000000..c51597c Binary files /dev/null and b/test/fixtures/upstream/ota/ota-003.wbxml differ diff --git a/test/fixtures/upstream/ota/ota-003.wbxml.xml b/test/fixtures/upstream/ota/ota-003.wbxml.xml new file mode 100644 index 0000000..0dcb25f --- /dev/null +++ b/test/fixtures/upstream/ota/ota-003.wbxml.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/test/fixtures/upstream/ota/ota-003.xml b/test/fixtures/upstream/ota/ota-003.xml new file mode 100644 index 0000000..508d56f --- /dev/null +++ b/test/fixtures/upstream/ota/ota-003.xml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-001.anon.wbxml b/test/fixtures/upstream/prov/prov-001.anon.wbxml new file mode 100644 index 0000000..640c312 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-001.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-001.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-001.anon.wbxml.xml new file mode 100644 index 0000000..7ae1645 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-001.anon.wbxml.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-001.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-001.nostrtbl.wbxml new file mode 100644 index 0000000..331eb36 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-001.wbxml b/test/fixtures/upstream/prov/prov-001.wbxml new file mode 100644 index 0000000..640c312 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-001.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-001.wbxml.xml b/test/fixtures/upstream/prov/prov-001.wbxml.xml new file mode 100644 index 0000000..7ae1645 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-001.wbxml.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-001.xml b/test/fixtures/upstream/prov/prov-001.xml new file mode 100644 index 0000000..bf4fbc2 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-001.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-002.anon.wbxml b/test/fixtures/upstream/prov/prov-002.anon.wbxml new file mode 100644 index 0000000..2c59edc Binary files /dev/null and b/test/fixtures/upstream/prov/prov-002.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-002.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-002.anon.wbxml.xml new file mode 100644 index 0000000..f1416dc --- /dev/null +++ b/test/fixtures/upstream/prov/prov-002.anon.wbxml.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-002.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-002.nostrtbl.wbxml new file mode 100644 index 0000000..50dd1a8 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-002.wbxml b/test/fixtures/upstream/prov/prov-002.wbxml new file mode 100644 index 0000000..2c59edc Binary files /dev/null and b/test/fixtures/upstream/prov/prov-002.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-002.wbxml.xml b/test/fixtures/upstream/prov/prov-002.wbxml.xml new file mode 100644 index 0000000..f1416dc --- /dev/null +++ b/test/fixtures/upstream/prov/prov-002.wbxml.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-002.xml b/test/fixtures/upstream/prov/prov-002.xml new file mode 100644 index 0000000..611c179 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-002.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-003.anon.wbxml b/test/fixtures/upstream/prov/prov-003.anon.wbxml new file mode 100644 index 0000000..e4e8808 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-003.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-003.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-003.anon.wbxml.xml new file mode 100644 index 0000000..067a3aa --- /dev/null +++ b/test/fixtures/upstream/prov/prov-003.anon.wbxml.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-003.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-003.nostrtbl.wbxml new file mode 100644 index 0000000..8a855d4 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-003.wbxml b/test/fixtures/upstream/prov/prov-003.wbxml new file mode 100644 index 0000000..e4e8808 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-003.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-003.wbxml.xml b/test/fixtures/upstream/prov/prov-003.wbxml.xml new file mode 100644 index 0000000..067a3aa --- /dev/null +++ b/test/fixtures/upstream/prov/prov-003.wbxml.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-003.xml b/test/fixtures/upstream/prov/prov-003.xml new file mode 100644 index 0000000..b8b96ac --- /dev/null +++ b/test/fixtures/upstream/prov/prov-003.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-004.anon.wbxml b/test/fixtures/upstream/prov/prov-004.anon.wbxml new file mode 100644 index 0000000..ac758df Binary files /dev/null and b/test/fixtures/upstream/prov/prov-004.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-004.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-004.anon.wbxml.xml new file mode 100644 index 0000000..43652b2 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-004.anon.wbxml.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-004.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-004.nostrtbl.wbxml new file mode 100644 index 0000000..4c7e244 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-004.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-004.wbxml b/test/fixtures/upstream/prov/prov-004.wbxml new file mode 100644 index 0000000..ac758df Binary files /dev/null and b/test/fixtures/upstream/prov/prov-004.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-004.wbxml.xml b/test/fixtures/upstream/prov/prov-004.wbxml.xml new file mode 100644 index 0000000..43652b2 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-004.wbxml.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-004.xml b/test/fixtures/upstream/prov/prov-004.xml new file mode 100644 index 0000000..fb72f9b --- /dev/null +++ b/test/fixtures/upstream/prov/prov-004.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-005.anon.wbxml b/test/fixtures/upstream/prov/prov-005.anon.wbxml new file mode 100644 index 0000000..ca4fa40 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-005.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-005.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-005.anon.wbxml.xml new file mode 100644 index 0000000..77e7edb --- /dev/null +++ b/test/fixtures/upstream/prov/prov-005.anon.wbxml.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-005.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-005.nostrtbl.wbxml new file mode 100644 index 0000000..ca4fa40 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-005.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-005.wbxml b/test/fixtures/upstream/prov/prov-005.wbxml new file mode 100644 index 0000000..ca4fa40 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-005.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-005.wbxml.xml b/test/fixtures/upstream/prov/prov-005.wbxml.xml new file mode 100644 index 0000000..77e7edb --- /dev/null +++ b/test/fixtures/upstream/prov/prov-005.wbxml.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-005.xml b/test/fixtures/upstream/prov/prov-005.xml new file mode 100644 index 0000000..a86fbd5 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-005.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-006.anon.wbxml b/test/fixtures/upstream/prov/prov-006.anon.wbxml new file mode 100644 index 0000000..cfcf9f6 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-006.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-006.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-006.anon.wbxml.xml new file mode 100644 index 0000000..2f602f5 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-006.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-006.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-006.nostrtbl.wbxml new file mode 100644 index 0000000..86394f7 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-006.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-006.wbxml b/test/fixtures/upstream/prov/prov-006.wbxml new file mode 100644 index 0000000..cfcf9f6 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-006.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-006.wbxml.xml b/test/fixtures/upstream/prov/prov-006.wbxml.xml new file mode 100644 index 0000000..2f602f5 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-006.wbxml.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-006.xml b/test/fixtures/upstream/prov/prov-006.xml new file mode 100644 index 0000000..b738ce1 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-006.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-007.anon.wbxml b/test/fixtures/upstream/prov/prov-007.anon.wbxml new file mode 100644 index 0000000..f2850bb Binary files /dev/null and b/test/fixtures/upstream/prov/prov-007.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-007.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-007.anon.wbxml.xml new file mode 100644 index 0000000..86dc10b --- /dev/null +++ b/test/fixtures/upstream/prov/prov-007.anon.wbxml.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-007.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-007.nostrtbl.wbxml new file mode 100644 index 0000000..0ae3b69 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-007.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-007.wbxml b/test/fixtures/upstream/prov/prov-007.wbxml new file mode 100644 index 0000000..f2850bb Binary files /dev/null and b/test/fixtures/upstream/prov/prov-007.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-007.wbxml.xml b/test/fixtures/upstream/prov/prov-007.wbxml.xml new file mode 100644 index 0000000..86dc10b --- /dev/null +++ b/test/fixtures/upstream/prov/prov-007.wbxml.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-007.xml b/test/fixtures/upstream/prov/prov-007.xml new file mode 100644 index 0000000..bb1d4b9 --- /dev/null +++ b/test/fixtures/upstream/prov/prov-007.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-008.anon.wbxml b/test/fixtures/upstream/prov/prov-008.anon.wbxml new file mode 100644 index 0000000..2ae7da5 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-008.anon.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-008.anon.wbxml.xml b/test/fixtures/upstream/prov/prov-008.anon.wbxml.xml new file mode 100644 index 0000000..8c1528f --- /dev/null +++ b/test/fixtures/upstream/prov/prov-008.anon.wbxml.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-008.nostrtbl.wbxml b/test/fixtures/upstream/prov/prov-008.nostrtbl.wbxml new file mode 100644 index 0000000..0981e16 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-008.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-008.wbxml b/test/fixtures/upstream/prov/prov-008.wbxml new file mode 100644 index 0000000..2ae7da5 Binary files /dev/null and b/test/fixtures/upstream/prov/prov-008.wbxml differ diff --git a/test/fixtures/upstream/prov/prov-008.wbxml.xml b/test/fixtures/upstream/prov/prov-008.wbxml.xml new file mode 100644 index 0000000..8c1528f --- /dev/null +++ b/test/fixtures/upstream/prov/prov-008.wbxml.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/prov/prov-008.xml b/test/fixtures/upstream/prov/prov-008.xml new file mode 100644 index 0000000..3973fea --- /dev/null +++ b/test/fixtures/upstream/prov/prov-008.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/si/si-001.anon.wbxml b/test/fixtures/upstream/si/si-001.anon.wbxml new file mode 100644 index 0000000..ef40e3e Binary files /dev/null and b/test/fixtures/upstream/si/si-001.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-001.anon.wbxml.xml b/test/fixtures/upstream/si/si-001.anon.wbxml.xml new file mode 100644 index 0000000..064cdf7 --- /dev/null +++ b/test/fixtures/upstream/si/si-001.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +You have 4 new emails + diff --git a/test/fixtures/upstream/si/si-001.nostrtbl.wbxml b/test/fixtures/upstream/si/si-001.nostrtbl.wbxml new file mode 100644 index 0000000..ef40e3e Binary files /dev/null and b/test/fixtures/upstream/si/si-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-001.wbxml b/test/fixtures/upstream/si/si-001.wbxml new file mode 100644 index 0000000..ef40e3e Binary files /dev/null and b/test/fixtures/upstream/si/si-001.wbxml differ diff --git a/test/fixtures/upstream/si/si-001.wbxml.canonical.xml b/test/fixtures/upstream/si/si-001.wbxml.canonical.xml new file mode 100644 index 0000000..957b120 --- /dev/null +++ b/test/fixtures/upstream/si/si-001.wbxml.canonical.xml @@ -0,0 +1 @@ +You have 4 new emails \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-001.wbxml.compact.xml b/test/fixtures/upstream/si/si-001.wbxml.compact.xml new file mode 100644 index 0000000..957b120 --- /dev/null +++ b/test/fixtures/upstream/si/si-001.wbxml.compact.xml @@ -0,0 +1 @@ +You have 4 new emails \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-001.wbxml.indent2.xml b/test/fixtures/upstream/si/si-001.wbxml.indent2.xml new file mode 100644 index 0000000..369b76d --- /dev/null +++ b/test/fixtures/upstream/si/si-001.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + You have 4 new emails + diff --git a/test/fixtures/upstream/si/si-001.wbxml.xml b/test/fixtures/upstream/si/si-001.wbxml.xml new file mode 100644 index 0000000..064cdf7 --- /dev/null +++ b/test/fixtures/upstream/si/si-001.wbxml.xml @@ -0,0 +1,5 @@ + + + +You have 4 new emails + diff --git a/test/fixtures/upstream/si/si-001.xml b/test/fixtures/upstream/si/si-001.xml new file mode 100644 index 0000000..f081b81 --- /dev/null +++ b/test/fixtures/upstream/si/si-001.xml @@ -0,0 +1,10 @@ + + + + + You have 4 new emails + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-002.anon.wbxml b/test/fixtures/upstream/si/si-002.anon.wbxml new file mode 100644 index 0000000..2adbe3c Binary files /dev/null and b/test/fixtures/upstream/si/si-002.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-002.anon.wbxml.xml b/test/fixtures/upstream/si/si-002.anon.wbxml.xml new file mode 100644 index 0000000..1d6872b --- /dev/null +++ b/test/fixtures/upstream/si/si-002.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test/fixtures/upstream/si/si-002.nostrtbl.wbxml b/test/fixtures/upstream/si/si-002.nostrtbl.wbxml new file mode 100644 index 0000000..2adbe3c Binary files /dev/null and b/test/fixtures/upstream/si/si-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-002.wbxml b/test/fixtures/upstream/si/si-002.wbxml new file mode 100644 index 0000000..2adbe3c Binary files /dev/null and b/test/fixtures/upstream/si/si-002.wbxml differ diff --git a/test/fixtures/upstream/si/si-002.wbxml.canonical.xml b/test/fixtures/upstream/si/si-002.wbxml.canonical.xml new file mode 100644 index 0000000..e08cb1e --- /dev/null +++ b/test/fixtures/upstream/si/si-002.wbxml.canonical.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-002.wbxml.compact.xml b/test/fixtures/upstream/si/si-002.wbxml.compact.xml new file mode 100644 index 0000000..e08cb1e --- /dev/null +++ b/test/fixtures/upstream/si/si-002.wbxml.compact.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-002.wbxml.indent2.xml b/test/fixtures/upstream/si/si-002.wbxml.indent2.xml new file mode 100644 index 0000000..ced006c --- /dev/null +++ b/test/fixtures/upstream/si/si-002.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test/fixtures/upstream/si/si-002.wbxml.xml b/test/fixtures/upstream/si/si-002.wbxml.xml new file mode 100644 index 0000000..1d6872b --- /dev/null +++ b/test/fixtures/upstream/si/si-002.wbxml.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test/fixtures/upstream/si/si-002.xml b/test/fixtures/upstream/si/si-002.xml new file mode 100644 index 0000000..3599463 --- /dev/null +++ b/test/fixtures/upstream/si/si-002.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-003.anon.wbxml b/test/fixtures/upstream/si/si-003.anon.wbxml new file mode 100644 index 0000000..010d785 Binary files /dev/null and b/test/fixtures/upstream/si/si-003.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-003.anon.wbxml.xml b/test/fixtures/upstream/si/si-003.anon.wbxml.xml new file mode 100644 index 0000000..e3be424 --- /dev/null +++ b/test/fixtures/upstream/si/si-003.anon.wbxml.xml @@ -0,0 +1,9 @@ + + + +Can you feel it ? + + + + + diff --git a/test/fixtures/upstream/si/si-003.nostrtbl.wbxml b/test/fixtures/upstream/si/si-003.nostrtbl.wbxml new file mode 100644 index 0000000..010d785 Binary files /dev/null and b/test/fixtures/upstream/si/si-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-003.wbxml b/test/fixtures/upstream/si/si-003.wbxml new file mode 100644 index 0000000..010d785 Binary files /dev/null and b/test/fixtures/upstream/si/si-003.wbxml differ diff --git a/test/fixtures/upstream/si/si-003.wbxml.canonical.xml b/test/fixtures/upstream/si/si-003.wbxml.canonical.xml new file mode 100644 index 0000000..4e8ae0e --- /dev/null +++ b/test/fixtures/upstream/si/si-003.wbxml.canonical.xml @@ -0,0 +1 @@ +Can you feel it ? \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-003.wbxml.compact.xml b/test/fixtures/upstream/si/si-003.wbxml.compact.xml new file mode 100644 index 0000000..4e8ae0e --- /dev/null +++ b/test/fixtures/upstream/si/si-003.wbxml.compact.xml @@ -0,0 +1 @@ +Can you feel it ? \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-003.wbxml.indent2.xml b/test/fixtures/upstream/si/si-003.wbxml.indent2.xml new file mode 100644 index 0000000..4393dd9 --- /dev/null +++ b/test/fixtures/upstream/si/si-003.wbxml.indent2.xml @@ -0,0 +1,9 @@ + + + + Can you feel it ? + + + + + diff --git a/test/fixtures/upstream/si/si-003.wbxml.xml b/test/fixtures/upstream/si/si-003.wbxml.xml new file mode 100644 index 0000000..e3be424 --- /dev/null +++ b/test/fixtures/upstream/si/si-003.wbxml.xml @@ -0,0 +1,9 @@ + + + +Can you feel it ? + + + + + diff --git a/test/fixtures/upstream/si/si-003.xml b/test/fixtures/upstream/si/si-003.xml new file mode 100644 index 0000000..c059f23 --- /dev/null +++ b/test/fixtures/upstream/si/si-003.xml @@ -0,0 +1,16 @@ + + + + + Can you feel it ? + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-004.anon.wbxml b/test/fixtures/upstream/si/si-004.anon.wbxml new file mode 100644 index 0000000..1efe751 Binary files /dev/null and b/test/fixtures/upstream/si/si-004.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-004.anon.wbxml.xml b/test/fixtures/upstream/si/si-004.anon.wbxml.xml new file mode 100644 index 0000000..5d64884 --- /dev/null +++ b/test/fixtures/upstream/si/si-004.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-004 + diff --git a/test/fixtures/upstream/si/si-004.nostrtbl.wbxml b/test/fixtures/upstream/si/si-004.nostrtbl.wbxml new file mode 100644 index 0000000..1efe751 Binary files /dev/null and b/test/fixtures/upstream/si/si-004.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-004.wbxml b/test/fixtures/upstream/si/si-004.wbxml new file mode 100644 index 0000000..1efe751 Binary files /dev/null and b/test/fixtures/upstream/si/si-004.wbxml differ diff --git a/test/fixtures/upstream/si/si-004.wbxml.canonical.xml b/test/fixtures/upstream/si/si-004.wbxml.canonical.xml new file mode 100644 index 0000000..052b98e --- /dev/null +++ b/test/fixtures/upstream/si/si-004.wbxml.canonical.xml @@ -0,0 +1 @@ +si-004 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-004.wbxml.compact.xml b/test/fixtures/upstream/si/si-004.wbxml.compact.xml new file mode 100644 index 0000000..052b98e --- /dev/null +++ b/test/fixtures/upstream/si/si-004.wbxml.compact.xml @@ -0,0 +1 @@ +si-004 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-004.wbxml.indent2.xml b/test/fixtures/upstream/si/si-004.wbxml.indent2.xml new file mode 100644 index 0000000..015affc --- /dev/null +++ b/test/fixtures/upstream/si/si-004.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-004 + diff --git a/test/fixtures/upstream/si/si-004.wbxml.xml b/test/fixtures/upstream/si/si-004.wbxml.xml new file mode 100644 index 0000000..5d64884 --- /dev/null +++ b/test/fixtures/upstream/si/si-004.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-004 + diff --git a/test/fixtures/upstream/si/si-004.xml b/test/fixtures/upstream/si/si-004.xml new file mode 100644 index 0000000..eea92a3 --- /dev/null +++ b/test/fixtures/upstream/si/si-004.xml @@ -0,0 +1,8 @@ + + + + + si-004 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-005.anon.wbxml b/test/fixtures/upstream/si/si-005.anon.wbxml new file mode 100644 index 0000000..4ae9e45 Binary files /dev/null and b/test/fixtures/upstream/si/si-005.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-005.anon.wbxml.xml b/test/fixtures/upstream/si/si-005.anon.wbxml.xml new file mode 100644 index 0000000..75175ab --- /dev/null +++ b/test/fixtures/upstream/si/si-005.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-005 + diff --git a/test/fixtures/upstream/si/si-005.nostrtbl.wbxml b/test/fixtures/upstream/si/si-005.nostrtbl.wbxml new file mode 100644 index 0000000..4ae9e45 Binary files /dev/null and b/test/fixtures/upstream/si/si-005.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-005.wbxml b/test/fixtures/upstream/si/si-005.wbxml new file mode 100644 index 0000000..4ae9e45 Binary files /dev/null and b/test/fixtures/upstream/si/si-005.wbxml differ diff --git a/test/fixtures/upstream/si/si-005.wbxml.canonical.xml b/test/fixtures/upstream/si/si-005.wbxml.canonical.xml new file mode 100644 index 0000000..6d89db7 --- /dev/null +++ b/test/fixtures/upstream/si/si-005.wbxml.canonical.xml @@ -0,0 +1 @@ +si-005 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-005.wbxml.compact.xml b/test/fixtures/upstream/si/si-005.wbxml.compact.xml new file mode 100644 index 0000000..6d89db7 --- /dev/null +++ b/test/fixtures/upstream/si/si-005.wbxml.compact.xml @@ -0,0 +1 @@ +si-005 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-005.wbxml.indent2.xml b/test/fixtures/upstream/si/si-005.wbxml.indent2.xml new file mode 100644 index 0000000..51efe93 --- /dev/null +++ b/test/fixtures/upstream/si/si-005.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-005 + diff --git a/test/fixtures/upstream/si/si-005.wbxml.xml b/test/fixtures/upstream/si/si-005.wbxml.xml new file mode 100644 index 0000000..75175ab --- /dev/null +++ b/test/fixtures/upstream/si/si-005.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-005 + diff --git a/test/fixtures/upstream/si/si-005.xml b/test/fixtures/upstream/si/si-005.xml new file mode 100644 index 0000000..5e8972c --- /dev/null +++ b/test/fixtures/upstream/si/si-005.xml @@ -0,0 +1,8 @@ + + + + + si-005 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-006.anon.wbxml b/test/fixtures/upstream/si/si-006.anon.wbxml new file mode 100644 index 0000000..df39cb4 Binary files /dev/null and b/test/fixtures/upstream/si/si-006.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-006.anon.wbxml.xml b/test/fixtures/upstream/si/si-006.anon.wbxml.xml new file mode 100644 index 0000000..41082d2 --- /dev/null +++ b/test/fixtures/upstream/si/si-006.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-006 + diff --git a/test/fixtures/upstream/si/si-006.nostrtbl.wbxml b/test/fixtures/upstream/si/si-006.nostrtbl.wbxml new file mode 100644 index 0000000..df39cb4 Binary files /dev/null and b/test/fixtures/upstream/si/si-006.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-006.wbxml b/test/fixtures/upstream/si/si-006.wbxml new file mode 100644 index 0000000..df39cb4 Binary files /dev/null and b/test/fixtures/upstream/si/si-006.wbxml differ diff --git a/test/fixtures/upstream/si/si-006.wbxml.canonical.xml b/test/fixtures/upstream/si/si-006.wbxml.canonical.xml new file mode 100644 index 0000000..7b1135e --- /dev/null +++ b/test/fixtures/upstream/si/si-006.wbxml.canonical.xml @@ -0,0 +1 @@ +si-006 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-006.wbxml.compact.xml b/test/fixtures/upstream/si/si-006.wbxml.compact.xml new file mode 100644 index 0000000..7b1135e --- /dev/null +++ b/test/fixtures/upstream/si/si-006.wbxml.compact.xml @@ -0,0 +1 @@ +si-006 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-006.wbxml.indent2.xml b/test/fixtures/upstream/si/si-006.wbxml.indent2.xml new file mode 100644 index 0000000..2bbd738 --- /dev/null +++ b/test/fixtures/upstream/si/si-006.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-006 + diff --git a/test/fixtures/upstream/si/si-006.wbxml.xml b/test/fixtures/upstream/si/si-006.wbxml.xml new file mode 100644 index 0000000..41082d2 --- /dev/null +++ b/test/fixtures/upstream/si/si-006.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-006 + diff --git a/test/fixtures/upstream/si/si-006.xml b/test/fixtures/upstream/si/si-006.xml new file mode 100644 index 0000000..a1c31a2 --- /dev/null +++ b/test/fixtures/upstream/si/si-006.xml @@ -0,0 +1,8 @@ + + + + + si-006 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-007.anon.wbxml b/test/fixtures/upstream/si/si-007.anon.wbxml new file mode 100644 index 0000000..366c56e Binary files /dev/null and b/test/fixtures/upstream/si/si-007.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-007.anon.wbxml.xml b/test/fixtures/upstream/si/si-007.anon.wbxml.xml new file mode 100644 index 0000000..b361e14 --- /dev/null +++ b/test/fixtures/upstream/si/si-007.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-007 + diff --git a/test/fixtures/upstream/si/si-007.nostrtbl.wbxml b/test/fixtures/upstream/si/si-007.nostrtbl.wbxml new file mode 100644 index 0000000..366c56e Binary files /dev/null and b/test/fixtures/upstream/si/si-007.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-007.wbxml b/test/fixtures/upstream/si/si-007.wbxml new file mode 100644 index 0000000..366c56e Binary files /dev/null and b/test/fixtures/upstream/si/si-007.wbxml differ diff --git a/test/fixtures/upstream/si/si-007.wbxml.canonical.xml b/test/fixtures/upstream/si/si-007.wbxml.canonical.xml new file mode 100644 index 0000000..c2aad51 --- /dev/null +++ b/test/fixtures/upstream/si/si-007.wbxml.canonical.xml @@ -0,0 +1 @@ +si-007 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-007.wbxml.compact.xml b/test/fixtures/upstream/si/si-007.wbxml.compact.xml new file mode 100644 index 0000000..c2aad51 --- /dev/null +++ b/test/fixtures/upstream/si/si-007.wbxml.compact.xml @@ -0,0 +1 @@ +si-007 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-007.wbxml.indent2.xml b/test/fixtures/upstream/si/si-007.wbxml.indent2.xml new file mode 100644 index 0000000..36784ab --- /dev/null +++ b/test/fixtures/upstream/si/si-007.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-007 + diff --git a/test/fixtures/upstream/si/si-007.wbxml.xml b/test/fixtures/upstream/si/si-007.wbxml.xml new file mode 100644 index 0000000..b361e14 --- /dev/null +++ b/test/fixtures/upstream/si/si-007.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-007 + diff --git a/test/fixtures/upstream/si/si-007.xml b/test/fixtures/upstream/si/si-007.xml new file mode 100644 index 0000000..f17b2d7 --- /dev/null +++ b/test/fixtures/upstream/si/si-007.xml @@ -0,0 +1,8 @@ + + + + + si-007 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-008.anon.wbxml b/test/fixtures/upstream/si/si-008.anon.wbxml new file mode 100644 index 0000000..188c1a2 Binary files /dev/null and b/test/fixtures/upstream/si/si-008.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-008.anon.wbxml.xml b/test/fixtures/upstream/si/si-008.anon.wbxml.xml new file mode 100644 index 0000000..e35f8e5 --- /dev/null +++ b/test/fixtures/upstream/si/si-008.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-008 + diff --git a/test/fixtures/upstream/si/si-008.nostrtbl.wbxml b/test/fixtures/upstream/si/si-008.nostrtbl.wbxml new file mode 100644 index 0000000..188c1a2 Binary files /dev/null and b/test/fixtures/upstream/si/si-008.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-008.wbxml b/test/fixtures/upstream/si/si-008.wbxml new file mode 100644 index 0000000..188c1a2 Binary files /dev/null and b/test/fixtures/upstream/si/si-008.wbxml differ diff --git a/test/fixtures/upstream/si/si-008.wbxml.canonical.xml b/test/fixtures/upstream/si/si-008.wbxml.canonical.xml new file mode 100644 index 0000000..f99ab1c --- /dev/null +++ b/test/fixtures/upstream/si/si-008.wbxml.canonical.xml @@ -0,0 +1 @@ +si-008 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-008.wbxml.compact.xml b/test/fixtures/upstream/si/si-008.wbxml.compact.xml new file mode 100644 index 0000000..f99ab1c --- /dev/null +++ b/test/fixtures/upstream/si/si-008.wbxml.compact.xml @@ -0,0 +1 @@ +si-008 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-008.wbxml.indent2.xml b/test/fixtures/upstream/si/si-008.wbxml.indent2.xml new file mode 100644 index 0000000..7b5d1cc --- /dev/null +++ b/test/fixtures/upstream/si/si-008.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-008 + diff --git a/test/fixtures/upstream/si/si-008.wbxml.xml b/test/fixtures/upstream/si/si-008.wbxml.xml new file mode 100644 index 0000000..e35f8e5 --- /dev/null +++ b/test/fixtures/upstream/si/si-008.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-008 + diff --git a/test/fixtures/upstream/si/si-008.xml b/test/fixtures/upstream/si/si-008.xml new file mode 100644 index 0000000..c22f1e1 --- /dev/null +++ b/test/fixtures/upstream/si/si-008.xml @@ -0,0 +1,8 @@ + + + + + si-008 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-009.anon.wbxml b/test/fixtures/upstream/si/si-009.anon.wbxml new file mode 100644 index 0000000..cf2fe3d Binary files /dev/null and b/test/fixtures/upstream/si/si-009.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-009.anon.wbxml.xml b/test/fixtures/upstream/si/si-009.anon.wbxml.xml new file mode 100644 index 0000000..b5fd152 --- /dev/null +++ b/test/fixtures/upstream/si/si-009.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-009 + diff --git a/test/fixtures/upstream/si/si-009.nostrtbl.wbxml b/test/fixtures/upstream/si/si-009.nostrtbl.wbxml new file mode 100644 index 0000000..cf2fe3d Binary files /dev/null and b/test/fixtures/upstream/si/si-009.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-009.wbxml b/test/fixtures/upstream/si/si-009.wbxml new file mode 100644 index 0000000..cf2fe3d Binary files /dev/null and b/test/fixtures/upstream/si/si-009.wbxml differ diff --git a/test/fixtures/upstream/si/si-009.wbxml.canonical.xml b/test/fixtures/upstream/si/si-009.wbxml.canonical.xml new file mode 100644 index 0000000..343ce5a --- /dev/null +++ b/test/fixtures/upstream/si/si-009.wbxml.canonical.xml @@ -0,0 +1 @@ +si-009 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-009.wbxml.compact.xml b/test/fixtures/upstream/si/si-009.wbxml.compact.xml new file mode 100644 index 0000000..343ce5a --- /dev/null +++ b/test/fixtures/upstream/si/si-009.wbxml.compact.xml @@ -0,0 +1 @@ +si-009 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-009.wbxml.indent2.xml b/test/fixtures/upstream/si/si-009.wbxml.indent2.xml new file mode 100644 index 0000000..b84b92a --- /dev/null +++ b/test/fixtures/upstream/si/si-009.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-009 + diff --git a/test/fixtures/upstream/si/si-009.wbxml.xml b/test/fixtures/upstream/si/si-009.wbxml.xml new file mode 100644 index 0000000..b5fd152 --- /dev/null +++ b/test/fixtures/upstream/si/si-009.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-009 + diff --git a/test/fixtures/upstream/si/si-009.xml b/test/fixtures/upstream/si/si-009.xml new file mode 100644 index 0000000..1c4ea88 --- /dev/null +++ b/test/fixtures/upstream/si/si-009.xml @@ -0,0 +1,8 @@ + + + + + si-009 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-010.anon.wbxml b/test/fixtures/upstream/si/si-010.anon.wbxml new file mode 100644 index 0000000..7f532b5 Binary files /dev/null and b/test/fixtures/upstream/si/si-010.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-010.anon.wbxml.xml b/test/fixtures/upstream/si/si-010.anon.wbxml.xml new file mode 100644 index 0000000..16e9f14 --- /dev/null +++ b/test/fixtures/upstream/si/si-010.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-010 + diff --git a/test/fixtures/upstream/si/si-010.nostrtbl.wbxml b/test/fixtures/upstream/si/si-010.nostrtbl.wbxml new file mode 100644 index 0000000..7f532b5 Binary files /dev/null and b/test/fixtures/upstream/si/si-010.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-010.wbxml b/test/fixtures/upstream/si/si-010.wbxml new file mode 100644 index 0000000..7f532b5 Binary files /dev/null and b/test/fixtures/upstream/si/si-010.wbxml differ diff --git a/test/fixtures/upstream/si/si-010.wbxml.canonical.xml b/test/fixtures/upstream/si/si-010.wbxml.canonical.xml new file mode 100644 index 0000000..60c3dda --- /dev/null +++ b/test/fixtures/upstream/si/si-010.wbxml.canonical.xml @@ -0,0 +1 @@ +si-010 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-010.wbxml.compact.xml b/test/fixtures/upstream/si/si-010.wbxml.compact.xml new file mode 100644 index 0000000..60c3dda --- /dev/null +++ b/test/fixtures/upstream/si/si-010.wbxml.compact.xml @@ -0,0 +1 @@ +si-010 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-010.wbxml.indent2.xml b/test/fixtures/upstream/si/si-010.wbxml.indent2.xml new file mode 100644 index 0000000..3fa0e74 --- /dev/null +++ b/test/fixtures/upstream/si/si-010.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-010 + diff --git a/test/fixtures/upstream/si/si-010.wbxml.xml b/test/fixtures/upstream/si/si-010.wbxml.xml new file mode 100644 index 0000000..16e9f14 --- /dev/null +++ b/test/fixtures/upstream/si/si-010.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-010 + diff --git a/test/fixtures/upstream/si/si-010.xml b/test/fixtures/upstream/si/si-010.xml new file mode 100644 index 0000000..3bdca6a --- /dev/null +++ b/test/fixtures/upstream/si/si-010.xml @@ -0,0 +1,8 @@ + + + + + si-010 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-011.anon.wbxml b/test/fixtures/upstream/si/si-011.anon.wbxml new file mode 100644 index 0000000..4f7c9bd Binary files /dev/null and b/test/fixtures/upstream/si/si-011.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-011.anon.wbxml.xml b/test/fixtures/upstream/si/si-011.anon.wbxml.xml new file mode 100644 index 0000000..bd5a860 --- /dev/null +++ b/test/fixtures/upstream/si/si-011.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-011 + diff --git a/test/fixtures/upstream/si/si-011.nostrtbl.wbxml b/test/fixtures/upstream/si/si-011.nostrtbl.wbxml new file mode 100644 index 0000000..4f7c9bd Binary files /dev/null and b/test/fixtures/upstream/si/si-011.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-011.wbxml b/test/fixtures/upstream/si/si-011.wbxml new file mode 100644 index 0000000..4f7c9bd Binary files /dev/null and b/test/fixtures/upstream/si/si-011.wbxml differ diff --git a/test/fixtures/upstream/si/si-011.wbxml.canonical.xml b/test/fixtures/upstream/si/si-011.wbxml.canonical.xml new file mode 100644 index 0000000..1ee204f --- /dev/null +++ b/test/fixtures/upstream/si/si-011.wbxml.canonical.xml @@ -0,0 +1 @@ +si-011 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-011.wbxml.compact.xml b/test/fixtures/upstream/si/si-011.wbxml.compact.xml new file mode 100644 index 0000000..1ee204f --- /dev/null +++ b/test/fixtures/upstream/si/si-011.wbxml.compact.xml @@ -0,0 +1 @@ +si-011 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-011.wbxml.indent2.xml b/test/fixtures/upstream/si/si-011.wbxml.indent2.xml new file mode 100644 index 0000000..f962ed6 --- /dev/null +++ b/test/fixtures/upstream/si/si-011.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-011 + diff --git a/test/fixtures/upstream/si/si-011.wbxml.xml b/test/fixtures/upstream/si/si-011.wbxml.xml new file mode 100644 index 0000000..bd5a860 --- /dev/null +++ b/test/fixtures/upstream/si/si-011.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-011 + diff --git a/test/fixtures/upstream/si/si-011.xml b/test/fixtures/upstream/si/si-011.xml new file mode 100644 index 0000000..70c9e09 --- /dev/null +++ b/test/fixtures/upstream/si/si-011.xml @@ -0,0 +1,8 @@ + + + + + si-011 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-012.anon.wbxml b/test/fixtures/upstream/si/si-012.anon.wbxml new file mode 100644 index 0000000..41f5fa1 Binary files /dev/null and b/test/fixtures/upstream/si/si-012.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-012.anon.wbxml.xml b/test/fixtures/upstream/si/si-012.anon.wbxml.xml new file mode 100644 index 0000000..0886960 --- /dev/null +++ b/test/fixtures/upstream/si/si-012.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-012 + diff --git a/test/fixtures/upstream/si/si-012.nostrtbl.wbxml b/test/fixtures/upstream/si/si-012.nostrtbl.wbxml new file mode 100644 index 0000000..41f5fa1 Binary files /dev/null and b/test/fixtures/upstream/si/si-012.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-012.wbxml b/test/fixtures/upstream/si/si-012.wbxml new file mode 100644 index 0000000..41f5fa1 Binary files /dev/null and b/test/fixtures/upstream/si/si-012.wbxml differ diff --git a/test/fixtures/upstream/si/si-012.wbxml.canonical.xml b/test/fixtures/upstream/si/si-012.wbxml.canonical.xml new file mode 100644 index 0000000..b9eb8eb --- /dev/null +++ b/test/fixtures/upstream/si/si-012.wbxml.canonical.xml @@ -0,0 +1 @@ +si-012 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-012.wbxml.compact.xml b/test/fixtures/upstream/si/si-012.wbxml.compact.xml new file mode 100644 index 0000000..b9eb8eb --- /dev/null +++ b/test/fixtures/upstream/si/si-012.wbxml.compact.xml @@ -0,0 +1 @@ +si-012 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-012.wbxml.indent2.xml b/test/fixtures/upstream/si/si-012.wbxml.indent2.xml new file mode 100644 index 0000000..acc7d71 --- /dev/null +++ b/test/fixtures/upstream/si/si-012.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-012 + diff --git a/test/fixtures/upstream/si/si-012.wbxml.xml b/test/fixtures/upstream/si/si-012.wbxml.xml new file mode 100644 index 0000000..0886960 --- /dev/null +++ b/test/fixtures/upstream/si/si-012.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-012 + diff --git a/test/fixtures/upstream/si/si-012.xml b/test/fixtures/upstream/si/si-012.xml new file mode 100644 index 0000000..b898f41 --- /dev/null +++ b/test/fixtures/upstream/si/si-012.xml @@ -0,0 +1,8 @@ + + + + + si-012 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-013.anon.wbxml b/test/fixtures/upstream/si/si-013.anon.wbxml new file mode 100644 index 0000000..96ba0e9 Binary files /dev/null and b/test/fixtures/upstream/si/si-013.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-013.anon.wbxml.xml b/test/fixtures/upstream/si/si-013.anon.wbxml.xml new file mode 100644 index 0000000..9ed314f --- /dev/null +++ b/test/fixtures/upstream/si/si-013.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-013 + diff --git a/test/fixtures/upstream/si/si-013.nostrtbl.wbxml b/test/fixtures/upstream/si/si-013.nostrtbl.wbxml new file mode 100644 index 0000000..96ba0e9 Binary files /dev/null and b/test/fixtures/upstream/si/si-013.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-013.wbxml b/test/fixtures/upstream/si/si-013.wbxml new file mode 100644 index 0000000..96ba0e9 Binary files /dev/null and b/test/fixtures/upstream/si/si-013.wbxml differ diff --git a/test/fixtures/upstream/si/si-013.wbxml.canonical.xml b/test/fixtures/upstream/si/si-013.wbxml.canonical.xml new file mode 100644 index 0000000..42665a1 --- /dev/null +++ b/test/fixtures/upstream/si/si-013.wbxml.canonical.xml @@ -0,0 +1 @@ +si-013 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-013.wbxml.compact.xml b/test/fixtures/upstream/si/si-013.wbxml.compact.xml new file mode 100644 index 0000000..42665a1 --- /dev/null +++ b/test/fixtures/upstream/si/si-013.wbxml.compact.xml @@ -0,0 +1 @@ +si-013 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-013.wbxml.indent2.xml b/test/fixtures/upstream/si/si-013.wbxml.indent2.xml new file mode 100644 index 0000000..89000df --- /dev/null +++ b/test/fixtures/upstream/si/si-013.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-013 + diff --git a/test/fixtures/upstream/si/si-013.wbxml.xml b/test/fixtures/upstream/si/si-013.wbxml.xml new file mode 100644 index 0000000..9ed314f --- /dev/null +++ b/test/fixtures/upstream/si/si-013.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-013 + diff --git a/test/fixtures/upstream/si/si-013.xml b/test/fixtures/upstream/si/si-013.xml new file mode 100644 index 0000000..ecb164c --- /dev/null +++ b/test/fixtures/upstream/si/si-013.xml @@ -0,0 +1,8 @@ + + + + + si-013 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-014.anon.wbxml b/test/fixtures/upstream/si/si-014.anon.wbxml new file mode 100644 index 0000000..fd6fcf7 Binary files /dev/null and b/test/fixtures/upstream/si/si-014.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-014.anon.wbxml.xml b/test/fixtures/upstream/si/si-014.anon.wbxml.xml new file mode 100644 index 0000000..d4a8054 --- /dev/null +++ b/test/fixtures/upstream/si/si-014.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-014 + diff --git a/test/fixtures/upstream/si/si-014.nostrtbl.wbxml b/test/fixtures/upstream/si/si-014.nostrtbl.wbxml new file mode 100644 index 0000000..fd6fcf7 Binary files /dev/null and b/test/fixtures/upstream/si/si-014.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-014.wbxml b/test/fixtures/upstream/si/si-014.wbxml new file mode 100644 index 0000000..fd6fcf7 Binary files /dev/null and b/test/fixtures/upstream/si/si-014.wbxml differ diff --git a/test/fixtures/upstream/si/si-014.wbxml.canonical.xml b/test/fixtures/upstream/si/si-014.wbxml.canonical.xml new file mode 100644 index 0000000..460c7bd --- /dev/null +++ b/test/fixtures/upstream/si/si-014.wbxml.canonical.xml @@ -0,0 +1 @@ +si-014 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-014.wbxml.compact.xml b/test/fixtures/upstream/si/si-014.wbxml.compact.xml new file mode 100644 index 0000000..460c7bd --- /dev/null +++ b/test/fixtures/upstream/si/si-014.wbxml.compact.xml @@ -0,0 +1 @@ +si-014 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-014.wbxml.indent2.xml b/test/fixtures/upstream/si/si-014.wbxml.indent2.xml new file mode 100644 index 0000000..ba5ac30 --- /dev/null +++ b/test/fixtures/upstream/si/si-014.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-014 + diff --git a/test/fixtures/upstream/si/si-014.wbxml.xml b/test/fixtures/upstream/si/si-014.wbxml.xml new file mode 100644 index 0000000..d4a8054 --- /dev/null +++ b/test/fixtures/upstream/si/si-014.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-014 + diff --git a/test/fixtures/upstream/si/si-014.xml b/test/fixtures/upstream/si/si-014.xml new file mode 100644 index 0000000..8ffa55d --- /dev/null +++ b/test/fixtures/upstream/si/si-014.xml @@ -0,0 +1,8 @@ + + + + + si-014 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-015.anon.wbxml b/test/fixtures/upstream/si/si-015.anon.wbxml new file mode 100644 index 0000000..556d9ab Binary files /dev/null and b/test/fixtures/upstream/si/si-015.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-015.anon.wbxml.xml b/test/fixtures/upstream/si/si-015.anon.wbxml.xml new file mode 100644 index 0000000..1b0a81d --- /dev/null +++ b/test/fixtures/upstream/si/si-015.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-015 + diff --git a/test/fixtures/upstream/si/si-015.nostrtbl.wbxml b/test/fixtures/upstream/si/si-015.nostrtbl.wbxml new file mode 100644 index 0000000..556d9ab Binary files /dev/null and b/test/fixtures/upstream/si/si-015.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-015.wbxml b/test/fixtures/upstream/si/si-015.wbxml new file mode 100644 index 0000000..556d9ab Binary files /dev/null and b/test/fixtures/upstream/si/si-015.wbxml differ diff --git a/test/fixtures/upstream/si/si-015.wbxml.canonical.xml b/test/fixtures/upstream/si/si-015.wbxml.canonical.xml new file mode 100644 index 0000000..eec30a1 --- /dev/null +++ b/test/fixtures/upstream/si/si-015.wbxml.canonical.xml @@ -0,0 +1 @@ +si-015 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-015.wbxml.compact.xml b/test/fixtures/upstream/si/si-015.wbxml.compact.xml new file mode 100644 index 0000000..eec30a1 --- /dev/null +++ b/test/fixtures/upstream/si/si-015.wbxml.compact.xml @@ -0,0 +1 @@ +si-015 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-015.wbxml.indent2.xml b/test/fixtures/upstream/si/si-015.wbxml.indent2.xml new file mode 100644 index 0000000..f56646d --- /dev/null +++ b/test/fixtures/upstream/si/si-015.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-015 + diff --git a/test/fixtures/upstream/si/si-015.wbxml.xml b/test/fixtures/upstream/si/si-015.wbxml.xml new file mode 100644 index 0000000..1b0a81d --- /dev/null +++ b/test/fixtures/upstream/si/si-015.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-015 + diff --git a/test/fixtures/upstream/si/si-015.xml b/test/fixtures/upstream/si/si-015.xml new file mode 100644 index 0000000..339f320 --- /dev/null +++ b/test/fixtures/upstream/si/si-015.xml @@ -0,0 +1,8 @@ + + + + + si-015 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-016.anon.wbxml b/test/fixtures/upstream/si/si-016.anon.wbxml new file mode 100644 index 0000000..4779492 Binary files /dev/null and b/test/fixtures/upstream/si/si-016.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-016.anon.wbxml.xml b/test/fixtures/upstream/si/si-016.anon.wbxml.xml new file mode 100644 index 0000000..80a0228 --- /dev/null +++ b/test/fixtures/upstream/si/si-016.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-016 + diff --git a/test/fixtures/upstream/si/si-016.nostrtbl.wbxml b/test/fixtures/upstream/si/si-016.nostrtbl.wbxml new file mode 100644 index 0000000..4779492 Binary files /dev/null and b/test/fixtures/upstream/si/si-016.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-016.wbxml b/test/fixtures/upstream/si/si-016.wbxml new file mode 100644 index 0000000..4779492 Binary files /dev/null and b/test/fixtures/upstream/si/si-016.wbxml differ diff --git a/test/fixtures/upstream/si/si-016.wbxml.canonical.xml b/test/fixtures/upstream/si/si-016.wbxml.canonical.xml new file mode 100644 index 0000000..4d4d414 --- /dev/null +++ b/test/fixtures/upstream/si/si-016.wbxml.canonical.xml @@ -0,0 +1 @@ +si-016 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-016.wbxml.compact.xml b/test/fixtures/upstream/si/si-016.wbxml.compact.xml new file mode 100644 index 0000000..4d4d414 --- /dev/null +++ b/test/fixtures/upstream/si/si-016.wbxml.compact.xml @@ -0,0 +1 @@ +si-016 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-016.wbxml.indent2.xml b/test/fixtures/upstream/si/si-016.wbxml.indent2.xml new file mode 100644 index 0000000..07d787a --- /dev/null +++ b/test/fixtures/upstream/si/si-016.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-016 + diff --git a/test/fixtures/upstream/si/si-016.wbxml.xml b/test/fixtures/upstream/si/si-016.wbxml.xml new file mode 100644 index 0000000..80a0228 --- /dev/null +++ b/test/fixtures/upstream/si/si-016.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-016 + diff --git a/test/fixtures/upstream/si/si-016.xml b/test/fixtures/upstream/si/si-016.xml new file mode 100644 index 0000000..28f76a3 --- /dev/null +++ b/test/fixtures/upstream/si/si-016.xml @@ -0,0 +1,8 @@ + + + + + si-016 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-017.anon.wbxml b/test/fixtures/upstream/si/si-017.anon.wbxml new file mode 100644 index 0000000..87bbc8d Binary files /dev/null and b/test/fixtures/upstream/si/si-017.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-017.anon.wbxml.xml b/test/fixtures/upstream/si/si-017.anon.wbxml.xml new file mode 100644 index 0000000..5886d92 --- /dev/null +++ b/test/fixtures/upstream/si/si-017.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-017 + diff --git a/test/fixtures/upstream/si/si-017.nostrtbl.wbxml b/test/fixtures/upstream/si/si-017.nostrtbl.wbxml new file mode 100644 index 0000000..87bbc8d Binary files /dev/null and b/test/fixtures/upstream/si/si-017.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-017.wbxml b/test/fixtures/upstream/si/si-017.wbxml new file mode 100644 index 0000000..87bbc8d Binary files /dev/null and b/test/fixtures/upstream/si/si-017.wbxml differ diff --git a/test/fixtures/upstream/si/si-017.wbxml.canonical.xml b/test/fixtures/upstream/si/si-017.wbxml.canonical.xml new file mode 100644 index 0000000..4a8c025 --- /dev/null +++ b/test/fixtures/upstream/si/si-017.wbxml.canonical.xml @@ -0,0 +1 @@ +si-017 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-017.wbxml.compact.xml b/test/fixtures/upstream/si/si-017.wbxml.compact.xml new file mode 100644 index 0000000..4a8c025 --- /dev/null +++ b/test/fixtures/upstream/si/si-017.wbxml.compact.xml @@ -0,0 +1 @@ +si-017 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-017.wbxml.indent2.xml b/test/fixtures/upstream/si/si-017.wbxml.indent2.xml new file mode 100644 index 0000000..137ad98 --- /dev/null +++ b/test/fixtures/upstream/si/si-017.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-017 + diff --git a/test/fixtures/upstream/si/si-017.wbxml.xml b/test/fixtures/upstream/si/si-017.wbxml.xml new file mode 100644 index 0000000..5886d92 --- /dev/null +++ b/test/fixtures/upstream/si/si-017.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-017 + diff --git a/test/fixtures/upstream/si/si-017.xml b/test/fixtures/upstream/si/si-017.xml new file mode 100644 index 0000000..b474e58 --- /dev/null +++ b/test/fixtures/upstream/si/si-017.xml @@ -0,0 +1,8 @@ + + + + + si-017 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-018.anon.wbxml b/test/fixtures/upstream/si/si-018.anon.wbxml new file mode 100644 index 0000000..3b40732 Binary files /dev/null and b/test/fixtures/upstream/si/si-018.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-018.anon.wbxml.xml b/test/fixtures/upstream/si/si-018.anon.wbxml.xml new file mode 100644 index 0000000..cb8208a --- /dev/null +++ b/test/fixtures/upstream/si/si-018.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-018 + diff --git a/test/fixtures/upstream/si/si-018.nostrtbl.wbxml b/test/fixtures/upstream/si/si-018.nostrtbl.wbxml new file mode 100644 index 0000000..3b40732 Binary files /dev/null and b/test/fixtures/upstream/si/si-018.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-018.wbxml b/test/fixtures/upstream/si/si-018.wbxml new file mode 100644 index 0000000..3b40732 Binary files /dev/null and b/test/fixtures/upstream/si/si-018.wbxml differ diff --git a/test/fixtures/upstream/si/si-018.wbxml.canonical.xml b/test/fixtures/upstream/si/si-018.wbxml.canonical.xml new file mode 100644 index 0000000..83ef319 --- /dev/null +++ b/test/fixtures/upstream/si/si-018.wbxml.canonical.xml @@ -0,0 +1 @@ +si-018 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-018.wbxml.compact.xml b/test/fixtures/upstream/si/si-018.wbxml.compact.xml new file mode 100644 index 0000000..83ef319 --- /dev/null +++ b/test/fixtures/upstream/si/si-018.wbxml.compact.xml @@ -0,0 +1 @@ +si-018 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-018.wbxml.indent2.xml b/test/fixtures/upstream/si/si-018.wbxml.indent2.xml new file mode 100644 index 0000000..49f68ec --- /dev/null +++ b/test/fixtures/upstream/si/si-018.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-018 + diff --git a/test/fixtures/upstream/si/si-018.wbxml.xml b/test/fixtures/upstream/si/si-018.wbxml.xml new file mode 100644 index 0000000..cb8208a --- /dev/null +++ b/test/fixtures/upstream/si/si-018.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-018 + diff --git a/test/fixtures/upstream/si/si-018.xml b/test/fixtures/upstream/si/si-018.xml new file mode 100644 index 0000000..aded6ef --- /dev/null +++ b/test/fixtures/upstream/si/si-018.xml @@ -0,0 +1,8 @@ + + + + + si-018 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-019.anon.wbxml b/test/fixtures/upstream/si/si-019.anon.wbxml new file mode 100644 index 0000000..2b65a2c Binary files /dev/null and b/test/fixtures/upstream/si/si-019.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-019.anon.wbxml.xml b/test/fixtures/upstream/si/si-019.anon.wbxml.xml new file mode 100644 index 0000000..c354767 --- /dev/null +++ b/test/fixtures/upstream/si/si-019.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-019 + diff --git a/test/fixtures/upstream/si/si-019.nostrtbl.wbxml b/test/fixtures/upstream/si/si-019.nostrtbl.wbxml new file mode 100644 index 0000000..2b65a2c Binary files /dev/null and b/test/fixtures/upstream/si/si-019.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-019.wbxml b/test/fixtures/upstream/si/si-019.wbxml new file mode 100644 index 0000000..2b65a2c Binary files /dev/null and b/test/fixtures/upstream/si/si-019.wbxml differ diff --git a/test/fixtures/upstream/si/si-019.wbxml.canonical.xml b/test/fixtures/upstream/si/si-019.wbxml.canonical.xml new file mode 100644 index 0000000..27e5d6e --- /dev/null +++ b/test/fixtures/upstream/si/si-019.wbxml.canonical.xml @@ -0,0 +1 @@ +si-019 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-019.wbxml.compact.xml b/test/fixtures/upstream/si/si-019.wbxml.compact.xml new file mode 100644 index 0000000..27e5d6e --- /dev/null +++ b/test/fixtures/upstream/si/si-019.wbxml.compact.xml @@ -0,0 +1 @@ +si-019 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-019.wbxml.indent2.xml b/test/fixtures/upstream/si/si-019.wbxml.indent2.xml new file mode 100644 index 0000000..bba93ff --- /dev/null +++ b/test/fixtures/upstream/si/si-019.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-019 + diff --git a/test/fixtures/upstream/si/si-019.wbxml.xml b/test/fixtures/upstream/si/si-019.wbxml.xml new file mode 100644 index 0000000..c354767 --- /dev/null +++ b/test/fixtures/upstream/si/si-019.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-019 + diff --git a/test/fixtures/upstream/si/si-019.xml b/test/fixtures/upstream/si/si-019.xml new file mode 100644 index 0000000..5175e9b --- /dev/null +++ b/test/fixtures/upstream/si/si-019.xml @@ -0,0 +1,8 @@ + + + + + si-019 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-020.anon.wbxml b/test/fixtures/upstream/si/si-020.anon.wbxml new file mode 100644 index 0000000..da4f343 Binary files /dev/null and b/test/fixtures/upstream/si/si-020.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-020.anon.wbxml.xml b/test/fixtures/upstream/si/si-020.anon.wbxml.xml new file mode 100644 index 0000000..c809d89 --- /dev/null +++ b/test/fixtures/upstream/si/si-020.anon.wbxml.xml @@ -0,0 +1,8 @@ + + + +si-020 + + + + diff --git a/test/fixtures/upstream/si/si-020.nostrtbl.wbxml b/test/fixtures/upstream/si/si-020.nostrtbl.wbxml new file mode 100644 index 0000000..da4f343 Binary files /dev/null and b/test/fixtures/upstream/si/si-020.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-020.wbxml b/test/fixtures/upstream/si/si-020.wbxml new file mode 100644 index 0000000..da4f343 Binary files /dev/null and b/test/fixtures/upstream/si/si-020.wbxml differ diff --git a/test/fixtures/upstream/si/si-020.wbxml.canonical.xml b/test/fixtures/upstream/si/si-020.wbxml.canonical.xml new file mode 100644 index 0000000..287ddd6 --- /dev/null +++ b/test/fixtures/upstream/si/si-020.wbxml.canonical.xml @@ -0,0 +1 @@ +si-020 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-020.wbxml.compact.xml b/test/fixtures/upstream/si/si-020.wbxml.compact.xml new file mode 100644 index 0000000..287ddd6 --- /dev/null +++ b/test/fixtures/upstream/si/si-020.wbxml.compact.xml @@ -0,0 +1 @@ +si-020 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-020.wbxml.indent2.xml b/test/fixtures/upstream/si/si-020.wbxml.indent2.xml new file mode 100644 index 0000000..5daace5 --- /dev/null +++ b/test/fixtures/upstream/si/si-020.wbxml.indent2.xml @@ -0,0 +1,8 @@ + + + + si-020 + + + + diff --git a/test/fixtures/upstream/si/si-020.wbxml.xml b/test/fixtures/upstream/si/si-020.wbxml.xml new file mode 100644 index 0000000..c809d89 --- /dev/null +++ b/test/fixtures/upstream/si/si-020.wbxml.xml @@ -0,0 +1,8 @@ + + + +si-020 + + + + diff --git a/test/fixtures/upstream/si/si-020.xml b/test/fixtures/upstream/si/si-020.xml new file mode 100644 index 0000000..6e28607 --- /dev/null +++ b/test/fixtures/upstream/si/si-020.xml @@ -0,0 +1,11 @@ + + + + + si-020 + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-021.anon.wbxml b/test/fixtures/upstream/si/si-021.anon.wbxml new file mode 100644 index 0000000..2163019 Binary files /dev/null and b/test/fixtures/upstream/si/si-021.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-021.anon.wbxml.xml b/test/fixtures/upstream/si/si-021.anon.wbxml.xml new file mode 100644 index 0000000..330756e --- /dev/null +++ b/test/fixtures/upstream/si/si-021.anon.wbxml.xml @@ -0,0 +1,10 @@ + + + +si-021 + + + + + + diff --git a/test/fixtures/upstream/si/si-021.nostrtbl.wbxml b/test/fixtures/upstream/si/si-021.nostrtbl.wbxml new file mode 100644 index 0000000..2163019 Binary files /dev/null and b/test/fixtures/upstream/si/si-021.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-021.wbxml b/test/fixtures/upstream/si/si-021.wbxml new file mode 100644 index 0000000..2163019 Binary files /dev/null and b/test/fixtures/upstream/si/si-021.wbxml differ diff --git a/test/fixtures/upstream/si/si-021.wbxml.canonical.xml b/test/fixtures/upstream/si/si-021.wbxml.canonical.xml new file mode 100644 index 0000000..6c890a6 --- /dev/null +++ b/test/fixtures/upstream/si/si-021.wbxml.canonical.xml @@ -0,0 +1 @@ +si-021 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-021.wbxml.compact.xml b/test/fixtures/upstream/si/si-021.wbxml.compact.xml new file mode 100644 index 0000000..6c890a6 --- /dev/null +++ b/test/fixtures/upstream/si/si-021.wbxml.compact.xml @@ -0,0 +1 @@ +si-021 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-021.wbxml.indent2.xml b/test/fixtures/upstream/si/si-021.wbxml.indent2.xml new file mode 100644 index 0000000..96f57f6 --- /dev/null +++ b/test/fixtures/upstream/si/si-021.wbxml.indent2.xml @@ -0,0 +1,10 @@ + + + + si-021 + + + + + + diff --git a/test/fixtures/upstream/si/si-021.wbxml.xml b/test/fixtures/upstream/si/si-021.wbxml.xml new file mode 100644 index 0000000..330756e --- /dev/null +++ b/test/fixtures/upstream/si/si-021.wbxml.xml @@ -0,0 +1,10 @@ + + + +si-021 + + + + + + diff --git a/test/fixtures/upstream/si/si-021.xml b/test/fixtures/upstream/si/si-021.xml new file mode 100644 index 0000000..5639145 --- /dev/null +++ b/test/fixtures/upstream/si/si-021.xml @@ -0,0 +1,13 @@ + + + + + si-021 + + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-022.anon.wbxml b/test/fixtures/upstream/si/si-022.anon.wbxml new file mode 100644 index 0000000..e810587 Binary files /dev/null and b/test/fixtures/upstream/si/si-022.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-022.anon.wbxml.xml b/test/fixtures/upstream/si/si-022.anon.wbxml.xml new file mode 100644 index 0000000..1e07129 --- /dev/null +++ b/test/fixtures/upstream/si/si-022.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-022 + diff --git a/test/fixtures/upstream/si/si-022.nostrtbl.wbxml b/test/fixtures/upstream/si/si-022.nostrtbl.wbxml new file mode 100644 index 0000000..e810587 Binary files /dev/null and b/test/fixtures/upstream/si/si-022.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-022.wbxml b/test/fixtures/upstream/si/si-022.wbxml new file mode 100644 index 0000000..e810587 Binary files /dev/null and b/test/fixtures/upstream/si/si-022.wbxml differ diff --git a/test/fixtures/upstream/si/si-022.wbxml.canonical.xml b/test/fixtures/upstream/si/si-022.wbxml.canonical.xml new file mode 100644 index 0000000..1e3543a --- /dev/null +++ b/test/fixtures/upstream/si/si-022.wbxml.canonical.xml @@ -0,0 +1 @@ +si-022 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-022.wbxml.compact.xml b/test/fixtures/upstream/si/si-022.wbxml.compact.xml new file mode 100644 index 0000000..1e3543a --- /dev/null +++ b/test/fixtures/upstream/si/si-022.wbxml.compact.xml @@ -0,0 +1 @@ +si-022 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-022.wbxml.indent2.xml b/test/fixtures/upstream/si/si-022.wbxml.indent2.xml new file mode 100644 index 0000000..02e1730 --- /dev/null +++ b/test/fixtures/upstream/si/si-022.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-022 + diff --git a/test/fixtures/upstream/si/si-022.wbxml.xml b/test/fixtures/upstream/si/si-022.wbxml.xml new file mode 100644 index 0000000..1e07129 --- /dev/null +++ b/test/fixtures/upstream/si/si-022.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-022 + diff --git a/test/fixtures/upstream/si/si-022.xml b/test/fixtures/upstream/si/si-022.xml new file mode 100644 index 0000000..f9ed6be --- /dev/null +++ b/test/fixtures/upstream/si/si-022.xml @@ -0,0 +1,8 @@ + + + + + si-022 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-023.anon.wbxml b/test/fixtures/upstream/si/si-023.anon.wbxml new file mode 100644 index 0000000..d9c829a Binary files /dev/null and b/test/fixtures/upstream/si/si-023.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-023.anon.wbxml.xml b/test/fixtures/upstream/si/si-023.anon.wbxml.xml new file mode 100644 index 0000000..64ce375 --- /dev/null +++ b/test/fixtures/upstream/si/si-023.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-023 + diff --git a/test/fixtures/upstream/si/si-023.nostrtbl.wbxml b/test/fixtures/upstream/si/si-023.nostrtbl.wbxml new file mode 100644 index 0000000..d9c829a Binary files /dev/null and b/test/fixtures/upstream/si/si-023.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-023.wbxml b/test/fixtures/upstream/si/si-023.wbxml new file mode 100644 index 0000000..d9c829a Binary files /dev/null and b/test/fixtures/upstream/si/si-023.wbxml differ diff --git a/test/fixtures/upstream/si/si-023.wbxml.canonical.xml b/test/fixtures/upstream/si/si-023.wbxml.canonical.xml new file mode 100644 index 0000000..61e2ef8 --- /dev/null +++ b/test/fixtures/upstream/si/si-023.wbxml.canonical.xml @@ -0,0 +1 @@ +si-023 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-023.wbxml.compact.xml b/test/fixtures/upstream/si/si-023.wbxml.compact.xml new file mode 100644 index 0000000..61e2ef8 --- /dev/null +++ b/test/fixtures/upstream/si/si-023.wbxml.compact.xml @@ -0,0 +1 @@ +si-023 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-023.wbxml.indent2.xml b/test/fixtures/upstream/si/si-023.wbxml.indent2.xml new file mode 100644 index 0000000..d9ae412 --- /dev/null +++ b/test/fixtures/upstream/si/si-023.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-023 + diff --git a/test/fixtures/upstream/si/si-023.wbxml.xml b/test/fixtures/upstream/si/si-023.wbxml.xml new file mode 100644 index 0000000..64ce375 --- /dev/null +++ b/test/fixtures/upstream/si/si-023.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-023 + diff --git a/test/fixtures/upstream/si/si-023.xml b/test/fixtures/upstream/si/si-023.xml new file mode 100644 index 0000000..3b109e9 --- /dev/null +++ b/test/fixtures/upstream/si/si-023.xml @@ -0,0 +1,8 @@ + + + + + si-023 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-024.anon.wbxml b/test/fixtures/upstream/si/si-024.anon.wbxml new file mode 100644 index 0000000..9d0c7f7 Binary files /dev/null and b/test/fixtures/upstream/si/si-024.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-024.anon.wbxml.xml b/test/fixtures/upstream/si/si-024.anon.wbxml.xml new file mode 100644 index 0000000..feadca9 --- /dev/null +++ b/test/fixtures/upstream/si/si-024.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-024 + diff --git a/test/fixtures/upstream/si/si-024.nostrtbl.wbxml b/test/fixtures/upstream/si/si-024.nostrtbl.wbxml new file mode 100644 index 0000000..9d0c7f7 Binary files /dev/null and b/test/fixtures/upstream/si/si-024.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-024.wbxml b/test/fixtures/upstream/si/si-024.wbxml new file mode 100644 index 0000000..9d0c7f7 Binary files /dev/null and b/test/fixtures/upstream/si/si-024.wbxml differ diff --git a/test/fixtures/upstream/si/si-024.wbxml.canonical.xml b/test/fixtures/upstream/si/si-024.wbxml.canonical.xml new file mode 100644 index 0000000..e9e2b57 --- /dev/null +++ b/test/fixtures/upstream/si/si-024.wbxml.canonical.xml @@ -0,0 +1 @@ +si-024 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-024.wbxml.compact.xml b/test/fixtures/upstream/si/si-024.wbxml.compact.xml new file mode 100644 index 0000000..e9e2b57 --- /dev/null +++ b/test/fixtures/upstream/si/si-024.wbxml.compact.xml @@ -0,0 +1 @@ +si-024 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-024.wbxml.indent2.xml b/test/fixtures/upstream/si/si-024.wbxml.indent2.xml new file mode 100644 index 0000000..ed5eef3 --- /dev/null +++ b/test/fixtures/upstream/si/si-024.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-024 + diff --git a/test/fixtures/upstream/si/si-024.wbxml.xml b/test/fixtures/upstream/si/si-024.wbxml.xml new file mode 100644 index 0000000..feadca9 --- /dev/null +++ b/test/fixtures/upstream/si/si-024.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-024 + diff --git a/test/fixtures/upstream/si/si-024.xml b/test/fixtures/upstream/si/si-024.xml new file mode 100644 index 0000000..32aebf4 --- /dev/null +++ b/test/fixtures/upstream/si/si-024.xml @@ -0,0 +1,8 @@ + + + + + si-024 + + \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-025.anon.wbxml b/test/fixtures/upstream/si/si-025.anon.wbxml new file mode 100644 index 0000000..9286371 Binary files /dev/null and b/test/fixtures/upstream/si/si-025.anon.wbxml differ diff --git a/test/fixtures/upstream/si/si-025.anon.wbxml.xml b/test/fixtures/upstream/si/si-025.anon.wbxml.xml new file mode 100644 index 0000000..fbb4320 --- /dev/null +++ b/test/fixtures/upstream/si/si-025.anon.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-025 + diff --git a/test/fixtures/upstream/si/si-025.nostrtbl.wbxml b/test/fixtures/upstream/si/si-025.nostrtbl.wbxml new file mode 100644 index 0000000..9286371 Binary files /dev/null and b/test/fixtures/upstream/si/si-025.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/si/si-025.wbxml b/test/fixtures/upstream/si/si-025.wbxml new file mode 100644 index 0000000..9286371 Binary files /dev/null and b/test/fixtures/upstream/si/si-025.wbxml differ diff --git a/test/fixtures/upstream/si/si-025.wbxml.canonical.xml b/test/fixtures/upstream/si/si-025.wbxml.canonical.xml new file mode 100644 index 0000000..9544ea2 --- /dev/null +++ b/test/fixtures/upstream/si/si-025.wbxml.canonical.xml @@ -0,0 +1 @@ +si-025 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-025.wbxml.compact.xml b/test/fixtures/upstream/si/si-025.wbxml.compact.xml new file mode 100644 index 0000000..9544ea2 --- /dev/null +++ b/test/fixtures/upstream/si/si-025.wbxml.compact.xml @@ -0,0 +1 @@ +si-025 \ No newline at end of file diff --git a/test/fixtures/upstream/si/si-025.wbxml.indent2.xml b/test/fixtures/upstream/si/si-025.wbxml.indent2.xml new file mode 100644 index 0000000..984c3e7 --- /dev/null +++ b/test/fixtures/upstream/si/si-025.wbxml.indent2.xml @@ -0,0 +1,5 @@ + + + + si-025 + diff --git a/test/fixtures/upstream/si/si-025.wbxml.xml b/test/fixtures/upstream/si/si-025.wbxml.xml new file mode 100644 index 0000000..fbb4320 --- /dev/null +++ b/test/fixtures/upstream/si/si-025.wbxml.xml @@ -0,0 +1,5 @@ + + + +si-025 + diff --git a/test/fixtures/upstream/si/si-025.xml b/test/fixtures/upstream/si/si-025.xml new file mode 100644 index 0000000..125f279 --- /dev/null +++ b/test/fixtures/upstream/si/si-025.xml @@ -0,0 +1,8 @@ + + + + + si-025 + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-001.anon.wbxml b/test/fixtures/upstream/sl/sl-001.anon.wbxml new file mode 100644 index 0000000..4b1add8 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-001.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-001.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-001.anon.wbxml.xml new file mode 100644 index 0000000..f339d25 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-001.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-001.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-001.nostrtbl.wbxml new file mode 100644 index 0000000..4b1add8 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-001.wbxml b/test/fixtures/upstream/sl/sl-001.wbxml new file mode 100644 index 0000000..4b1add8 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-001.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-001.wbxml.xml b/test/fixtures/upstream/sl/sl-001.wbxml.xml new file mode 100644 index 0000000..f339d25 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-001.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-001.xml b/test/fixtures/upstream/sl/sl-001.xml new file mode 100644 index 0000000..1e28d95 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-001.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-002.anon.wbxml b/test/fixtures/upstream/sl/sl-002.anon.wbxml new file mode 100644 index 0000000..09f46ee Binary files /dev/null and b/test/fixtures/upstream/sl/sl-002.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-002.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-002.anon.wbxml.xml new file mode 100644 index 0000000..7e41a6a --- /dev/null +++ b/test/fixtures/upstream/sl/sl-002.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-002.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-002.nostrtbl.wbxml new file mode 100644 index 0000000..09f46ee Binary files /dev/null and b/test/fixtures/upstream/sl/sl-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-002.wbxml b/test/fixtures/upstream/sl/sl-002.wbxml new file mode 100644 index 0000000..09f46ee Binary files /dev/null and b/test/fixtures/upstream/sl/sl-002.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-002.wbxml.xml b/test/fixtures/upstream/sl/sl-002.wbxml.xml new file mode 100644 index 0000000..7e41a6a --- /dev/null +++ b/test/fixtures/upstream/sl/sl-002.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-002.xml b/test/fixtures/upstream/sl/sl-002.xml new file mode 100644 index 0000000..123e09e --- /dev/null +++ b/test/fixtures/upstream/sl/sl-002.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-003.anon.wbxml b/test/fixtures/upstream/sl/sl-003.anon.wbxml new file mode 100644 index 0000000..0987be1 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-003.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-003.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-003.anon.wbxml.xml new file mode 100644 index 0000000..17093c0 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-003.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-003.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-003.nostrtbl.wbxml new file mode 100644 index 0000000..0987be1 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-003.wbxml b/test/fixtures/upstream/sl/sl-003.wbxml new file mode 100644 index 0000000..0987be1 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-003.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-003.wbxml.xml b/test/fixtures/upstream/sl/sl-003.wbxml.xml new file mode 100644 index 0000000..17093c0 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-003.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-003.xml b/test/fixtures/upstream/sl/sl-003.xml new file mode 100644 index 0000000..33b3760 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-003.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-004.anon.wbxml b/test/fixtures/upstream/sl/sl-004.anon.wbxml new file mode 100644 index 0000000..919d57d Binary files /dev/null and b/test/fixtures/upstream/sl/sl-004.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-004.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-004.anon.wbxml.xml new file mode 100644 index 0000000..1e56bdd --- /dev/null +++ b/test/fixtures/upstream/sl/sl-004.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-004.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-004.nostrtbl.wbxml new file mode 100644 index 0000000..919d57d Binary files /dev/null and b/test/fixtures/upstream/sl/sl-004.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-004.wbxml b/test/fixtures/upstream/sl/sl-004.wbxml new file mode 100644 index 0000000..919d57d Binary files /dev/null and b/test/fixtures/upstream/sl/sl-004.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-004.wbxml.xml b/test/fixtures/upstream/sl/sl-004.wbxml.xml new file mode 100644 index 0000000..1e56bdd --- /dev/null +++ b/test/fixtures/upstream/sl/sl-004.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-004.xml b/test/fixtures/upstream/sl/sl-004.xml new file mode 100644 index 0000000..3fa8886 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-004.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-005.anon.wbxml b/test/fixtures/upstream/sl/sl-005.anon.wbxml new file mode 100644 index 0000000..5416d70 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-005.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-005.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-005.anon.wbxml.xml new file mode 100644 index 0000000..254631c --- /dev/null +++ b/test/fixtures/upstream/sl/sl-005.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-005.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-005.nostrtbl.wbxml new file mode 100644 index 0000000..5416d70 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-005.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-005.wbxml b/test/fixtures/upstream/sl/sl-005.wbxml new file mode 100644 index 0000000..5416d70 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-005.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-005.wbxml.xml b/test/fixtures/upstream/sl/sl-005.wbxml.xml new file mode 100644 index 0000000..254631c --- /dev/null +++ b/test/fixtures/upstream/sl/sl-005.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-005.xml b/test/fixtures/upstream/sl/sl-005.xml new file mode 100644 index 0000000..fd51a7f --- /dev/null +++ b/test/fixtures/upstream/sl/sl-005.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-006.anon.wbxml b/test/fixtures/upstream/sl/sl-006.anon.wbxml new file mode 100644 index 0000000..6bc4ed4 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-006.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-006.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-006.anon.wbxml.xml new file mode 100644 index 0000000..153fa78 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-006.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-006.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-006.nostrtbl.wbxml new file mode 100644 index 0000000..6bc4ed4 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-006.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-006.wbxml b/test/fixtures/upstream/sl/sl-006.wbxml new file mode 100644 index 0000000..6bc4ed4 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-006.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-006.wbxml.xml b/test/fixtures/upstream/sl/sl-006.wbxml.xml new file mode 100644 index 0000000..153fa78 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-006.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-006.xml b/test/fixtures/upstream/sl/sl-006.xml new file mode 100644 index 0000000..d5dc2c3 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-006.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-007.anon.wbxml b/test/fixtures/upstream/sl/sl-007.anon.wbxml new file mode 100644 index 0000000..9ba5edc Binary files /dev/null and b/test/fixtures/upstream/sl/sl-007.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-007.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-007.anon.wbxml.xml new file mode 100644 index 0000000..4141afe --- /dev/null +++ b/test/fixtures/upstream/sl/sl-007.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-007.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-007.nostrtbl.wbxml new file mode 100644 index 0000000..9ba5edc Binary files /dev/null and b/test/fixtures/upstream/sl/sl-007.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-007.wbxml b/test/fixtures/upstream/sl/sl-007.wbxml new file mode 100644 index 0000000..9ba5edc Binary files /dev/null and b/test/fixtures/upstream/sl/sl-007.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-007.wbxml.xml b/test/fixtures/upstream/sl/sl-007.wbxml.xml new file mode 100644 index 0000000..4141afe --- /dev/null +++ b/test/fixtures/upstream/sl/sl-007.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-007.xml b/test/fixtures/upstream/sl/sl-007.xml new file mode 100644 index 0000000..29b0572 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-007.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-008.anon.wbxml b/test/fixtures/upstream/sl/sl-008.anon.wbxml new file mode 100644 index 0000000..af2a173 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-008.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-008.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-008.anon.wbxml.xml new file mode 100644 index 0000000..9d29909 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-008.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-008.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-008.nostrtbl.wbxml new file mode 100644 index 0000000..af2a173 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-008.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-008.wbxml b/test/fixtures/upstream/sl/sl-008.wbxml new file mode 100644 index 0000000..af2a173 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-008.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-008.wbxml.xml b/test/fixtures/upstream/sl/sl-008.wbxml.xml new file mode 100644 index 0000000..9d29909 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-008.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-008.xml b/test/fixtures/upstream/sl/sl-008.xml new file mode 100644 index 0000000..a35e10c --- /dev/null +++ b/test/fixtures/upstream/sl/sl-008.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-009.anon.wbxml b/test/fixtures/upstream/sl/sl-009.anon.wbxml new file mode 100644 index 0000000..6bd574a Binary files /dev/null and b/test/fixtures/upstream/sl/sl-009.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-009.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-009.anon.wbxml.xml new file mode 100644 index 0000000..02ff6cd --- /dev/null +++ b/test/fixtures/upstream/sl/sl-009.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-009.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-009.nostrtbl.wbxml new file mode 100644 index 0000000..6bd574a Binary files /dev/null and b/test/fixtures/upstream/sl/sl-009.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-009.wbxml b/test/fixtures/upstream/sl/sl-009.wbxml new file mode 100644 index 0000000..6bd574a Binary files /dev/null and b/test/fixtures/upstream/sl/sl-009.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-009.wbxml.xml b/test/fixtures/upstream/sl/sl-009.wbxml.xml new file mode 100644 index 0000000..02ff6cd --- /dev/null +++ b/test/fixtures/upstream/sl/sl-009.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-009.xml b/test/fixtures/upstream/sl/sl-009.xml new file mode 100644 index 0000000..5715472 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-009.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-010.anon.wbxml b/test/fixtures/upstream/sl/sl-010.anon.wbxml new file mode 100644 index 0000000..8bfe709 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-010.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-010.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-010.anon.wbxml.xml new file mode 100644 index 0000000..35eb8b5 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-010.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-010.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-010.nostrtbl.wbxml new file mode 100644 index 0000000..8bfe709 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-010.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-010.wbxml b/test/fixtures/upstream/sl/sl-010.wbxml new file mode 100644 index 0000000..8bfe709 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-010.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-010.wbxml.xml b/test/fixtures/upstream/sl/sl-010.wbxml.xml new file mode 100644 index 0000000..35eb8b5 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-010.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-010.xml b/test/fixtures/upstream/sl/sl-010.xml new file mode 100644 index 0000000..828a66f --- /dev/null +++ b/test/fixtures/upstream/sl/sl-010.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-011.anon.wbxml b/test/fixtures/upstream/sl/sl-011.anon.wbxml new file mode 100644 index 0000000..0eaebbf Binary files /dev/null and b/test/fixtures/upstream/sl/sl-011.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-011.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-011.anon.wbxml.xml new file mode 100644 index 0000000..c7ae861 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-011.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-011.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-011.nostrtbl.wbxml new file mode 100644 index 0000000..0eaebbf Binary files /dev/null and b/test/fixtures/upstream/sl/sl-011.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-011.wbxml b/test/fixtures/upstream/sl/sl-011.wbxml new file mode 100644 index 0000000..0eaebbf Binary files /dev/null and b/test/fixtures/upstream/sl/sl-011.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-011.wbxml.xml b/test/fixtures/upstream/sl/sl-011.wbxml.xml new file mode 100644 index 0000000..c7ae861 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-011.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-011.xml b/test/fixtures/upstream/sl/sl-011.xml new file mode 100644 index 0000000..c88082a --- /dev/null +++ b/test/fixtures/upstream/sl/sl-011.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-012.anon.wbxml b/test/fixtures/upstream/sl/sl-012.anon.wbxml new file mode 100644 index 0000000..732ea10 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-012.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-012.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-012.anon.wbxml.xml new file mode 100644 index 0000000..6190563 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-012.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-012.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-012.nostrtbl.wbxml new file mode 100644 index 0000000..732ea10 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-012.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-012.wbxml b/test/fixtures/upstream/sl/sl-012.wbxml new file mode 100644 index 0000000..732ea10 Binary files /dev/null and b/test/fixtures/upstream/sl/sl-012.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-012.wbxml.xml b/test/fixtures/upstream/sl/sl-012.wbxml.xml new file mode 100644 index 0000000..6190563 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-012.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-012.xml b/test/fixtures/upstream/sl/sl-012.xml new file mode 100644 index 0000000..142a4b0 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-012.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/sl/sl-013.anon.wbxml b/test/fixtures/upstream/sl/sl-013.anon.wbxml new file mode 100644 index 0000000..6187efe Binary files /dev/null and b/test/fixtures/upstream/sl/sl-013.anon.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-013.anon.wbxml.xml b/test/fixtures/upstream/sl/sl-013.anon.wbxml.xml new file mode 100644 index 0000000..25cf9a0 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-013.anon.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-013.nostrtbl.wbxml b/test/fixtures/upstream/sl/sl-013.nostrtbl.wbxml new file mode 100644 index 0000000..6187efe Binary files /dev/null and b/test/fixtures/upstream/sl/sl-013.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-013.wbxml b/test/fixtures/upstream/sl/sl-013.wbxml new file mode 100644 index 0000000..6187efe Binary files /dev/null and b/test/fixtures/upstream/sl/sl-013.wbxml differ diff --git a/test/fixtures/upstream/sl/sl-013.wbxml.xml b/test/fixtures/upstream/sl/sl-013.wbxml.xml new file mode 100644 index 0000000..25cf9a0 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-013.wbxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/test/fixtures/upstream/sl/sl-013.xml b/test/fixtures/upstream/sl/sl-013.xml new file mode 100644 index 0000000..8870b54 --- /dev/null +++ b/test/fixtures/upstream/sl/sl-013.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-001.anon.wbxml b/test/fixtures/upstream/syncml/syncml-001.anon.wbxml new file mode 100644 index 0000000..1012b1d Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-001.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-001.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-001.anon.wbxml.xml new file mode 100644 index 0000000..af16009 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-001.anon.wbxml.xml @@ -0,0 +1,27 @@ + + + + +1.1 +SyncML/1.1 +1 +2 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +2 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +101 + + + diff --git a/test/fixtures/upstream/syncml/syncml-001.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-001.nostrtbl.wbxml new file mode 100644 index 0000000..9540bd6 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-001.wbxml b/test/fixtures/upstream/syncml/syncml-001.wbxml new file mode 100644 index 0000000..1012b1d Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-001.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-001.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-001.wbxml.canonical.xml new file mode 100644 index 0000000..c0cb87f --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-001.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.112IMEI:493005100592800http://www.syncml.org/sync-server120SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800101 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-001.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-001.wbxml.compact.xml new file mode 100644 index 0000000..c0cb87f --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-001.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.112IMEI:493005100592800http://www.syncml.org/sync-server120SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800101 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-001.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-001.wbxml.indent2.xml new file mode 100644 index 0000000..88c3d53 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-001.wbxml.indent2.xml @@ -0,0 +1,27 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 2 + + IMEI:493005100592800 + + + http://www.syncml.org/sync-server + + + + + 1 + 2 + 0 + SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 101 + + + diff --git a/test/fixtures/upstream/syncml/syncml-001.wbxml.xml b/test/fixtures/upstream/syncml/syncml-001.wbxml.xml new file mode 100644 index 0000000..af16009 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-001.wbxml.xml @@ -0,0 +1,27 @@ + + + + +1.1 +SyncML/1.1 +1 +2 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +2 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +101 + + + diff --git a/test/fixtures/upstream/syncml/syncml-001.xml b/test/fixtures/upstream/syncml/syncml-001.xml new file mode 100644 index 0000000..7d674fe --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-001.xml @@ -0,0 +1,21 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 2 + IMEI:493005100592800 + http://www.syncml.org/sync-server + + + + 1 + 20SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 101 + + + diff --git a/test/fixtures/upstream/syncml/syncml-002.anon.wbxml b/test/fixtures/upstream/syncml/syncml-002.anon.wbxml new file mode 100644 index 0000000..d130c54 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-002.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-002.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-002.anon.wbxml.xml new file mode 100644 index 0000000..573bd09 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-002.anon.wbxml.xml @@ -0,0 +1,30 @@ + + + + +1.1 +SyncML/1.1 +1 +3 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + +1 +221 + + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-002.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-002.nostrtbl.wbxml new file mode 100644 index 0000000..54dee76 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-002.wbxml b/test/fixtures/upstream/syncml/syncml-002.wbxml new file mode 100644 index 0000000..d130c54 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-002.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-002.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-002.wbxml.canonical.xml new file mode 100644 index 0000000..61527d6 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-002.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.113http://www.syncml.org/sync-serverIMEI:4930051005928001221http://www.syncml.org/sync-serverIMEI:493005100592800 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-002.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-002.wbxml.compact.xml new file mode 100644 index 0000000..61527d6 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-002.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.113http://www.syncml.org/sync-serverIMEI:4930051005928001221http://www.syncml.org/sync-serverIMEI:493005100592800 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-002.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-002.wbxml.indent2.xml new file mode 100644 index 0000000..932204a --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-002.wbxml.indent2.xml @@ -0,0 +1,30 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 3 + + http://www.syncml.org/sync-server + + + IMEI:493005100592800 + + + + + 1 + 221 + + + http://www.syncml.org/sync-server + + + IMEI:493005100592800 + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-002.wbxml.xml b/test/fixtures/upstream/syncml/syncml-002.wbxml.xml new file mode 100644 index 0000000..573bd09 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-002.wbxml.xml @@ -0,0 +1,30 @@ + + + + +1.1 +SyncML/1.1 +1 +3 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + +1 +221 + + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-002.xml b/test/fixtures/upstream/syncml/syncml-002.xml new file mode 100644 index 0000000..4f2d909 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-002.xml @@ -0,0 +1,22 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 3 + http://www.syncml.org/sync-server + IMEI:493005100592800 + + + + 1 + 221 + + http://www.syncml.org/sync-server + IMEI:493005100592800 + + + + diff --git a/test/fixtures/upstream/syncml/syncml-003.anon.wbxml b/test/fixtures/upstream/syncml/syncml-003.anon.wbxml new file mode 100644 index 0000000..b68da01 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-003.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-003.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-003.anon.wbxml.xml new file mode 100644 index 0000000..3a3819e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-003.anon.wbxml.xml @@ -0,0 +1,109 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + +syncml:auth-basic + +QnJ1Y2UyOk9oQmVoYXZl + + +5000 + + + + +1 +200 + + +./contacts/james_bond + + +./dev-contacts + + + +234 +276 + + + + + +2 + +application/vnd.syncml-devinf+xml + + + +./devinf11 + + +Big Factory, Ltd. +4119 +Jane's phones +2.0e +2.0 +1.22I +1218182THD000001-2 +phone + +./contacts +Phonebook +32 + +text/x-vcard +2.1 + + +text/x-vcard +2.1 + + + +text/x-vcard +BEGIN +VCARD +END +VCARD +VERSION +2.1 +N +TEL +VOICE +CELL + + +01 +02 + + + + + + +3 + +application/vnd.syncml-devinf+xml + + + +./devinf11 + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-003.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-003.nostrtbl.wbxml new file mode 100644 index 0000000..86418cd Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-003.wbxml b/test/fixtures/upstream/syncml/syncml-003.wbxml new file mode 100644 index 0000000..b68da01 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-003.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-003.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-003.wbxml.canonical.xml new file mode 100644 index 0000000..0b683ff --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-003.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.111http://www.syncml.org/sync-serverIMEI:493005100592800syncml:auth-basicQnJ1Y2UyOk9oQmVoYXZl50001200./contacts/james_bond./dev-contacts2342762application/vnd.syncml-devinf+xml./devinf11Big Factory, Ltd.4119Jane's phones2.0e2.01.22I1218182THD000001-2phone./contactsPhonebook32text/x-vcard2.1text/x-vcard2.1text/x-vcardBEGINVCARDENDVCARDVERSION2.1NTELVOICECELL01023application/vnd.syncml-devinf+xml./devinf11 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-003.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-003.wbxml.compact.xml new file mode 100644 index 0000000..0b683ff --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-003.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.111http://www.syncml.org/sync-serverIMEI:493005100592800syncml:auth-basicQnJ1Y2UyOk9oQmVoYXZl50001200./contacts/james_bond./dev-contacts2342762application/vnd.syncml-devinf+xml./devinf11Big Factory, Ltd.4119Jane's phones2.0e2.01.22I1218182THD000001-2phone./contactsPhonebook32text/x-vcard2.1text/x-vcard2.1text/x-vcardBEGINVCARDENDVCARDVERSION2.1NTELVOICECELL01023application/vnd.syncml-devinf+xml./devinf11 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-003.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-003.wbxml.indent2.xml new file mode 100644 index 0000000..e75bd3e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-003.wbxml.indent2.xml @@ -0,0 +1,109 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + + http://www.syncml.org/sync-server + + + IMEI:493005100592800 + + + + syncml:auth-basic + + QnJ1Y2UyOk9oQmVoYXZl + + + 5000 + + + + + 1 + 200 + + + ./contacts/james_bond + + + ./dev-contacts + + + + 234 + 276 + + + + + + 2 + + application/vnd.syncml-devinf+xml + + + + ./devinf11 + + + Big Factory, Ltd. + 4119 + Jane's phones + 2.0e + 2.0 + 1.22I + 1218182THD000001-2 + phone + + ./contacts + Phonebook + 32 + + text/x-vcard + 2.1 + + + text/x-vcard + 2.1 + + + + text/x-vcard + BEGIN + VCARD + END + VCARD + VERSION + 2.1 + N + TEL + VOICE + CELL + + + 01 + 02 + + + + + + + 3 + + application/vnd.syncml-devinf+xml + + + + ./devinf11 + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-003.wbxml.xml b/test/fixtures/upstream/syncml/syncml-003.wbxml.xml new file mode 100644 index 0000000..3a3819e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-003.wbxml.xml @@ -0,0 +1,109 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + +syncml:auth-basic + +QnJ1Y2UyOk9oQmVoYXZl + + +5000 + + + + +1 +200 + + +./contacts/james_bond + + +./dev-contacts + + + +234 +276 + + + + + +2 + +application/vnd.syncml-devinf+xml + + + +./devinf11 + + +Big Factory, Ltd. +4119 +Jane's phones +2.0e +2.0 +1.22I +1218182THD000001-2 +phone + +./contacts +Phonebook +32 + +text/x-vcard +2.1 + + +text/x-vcard +2.1 + + + +text/x-vcard +BEGIN +VCARD +END +VCARD +VERSION +2.1 +N +TEL +VOICE +CELL + + +01 +02 + + + + + + +3 + +application/vnd.syncml-devinf+xml + + + +./devinf11 + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-003.xml b/test/fixtures/upstream/syncml/syncml-003.xml new file mode 100644 index 0000000..1dd1100 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-003.xml @@ -0,0 +1,92 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + http://www.syncml.org/sync-server + IMEI:493005100592800 + + syncml:auth-basic + QnJ1Y2UyOk9oQmVoYXZl + + + 5000 + + + + + 1 + 200 + + ./contacts/james_bond + ./dev-contacts + + + 234 + 276 + + + + + + 2 + application/vnd.syncml-devinf+xml + + ./devinf11 + + + Big Factory, Ltd. + 4119 + Jane's phones + 2.0e + 2.0 + 1.22I + 1218182THD000001-2 + phone + + ./contacts + Phonebook + 32 + + text/x-vcard + 2.1 + + + text/x-vcard + 2.1 + + + + text/x-vcard + BEGIN + VCARD + END + VCARD + VERSION + 2.1 + N + TEL + VOICE + CELL + + + 01 + 02 + + + + + + + 3 + application/vnd.syncml-devinf+xml + + ./devinf11 + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-004.anon.wbxml b/test/fixtures/upstream/syncml/syncml-004.anon.wbxml new file mode 100644 index 0000000..357e889 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-004.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-004.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-004.anon.wbxml.xml new file mode 100644 index 0000000..41b45b0 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-004.anon.wbxml.xml @@ -0,0 +1,147 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + +syncml:auth-basic + +QnJ1Y2UyOk9oQmVoYXZl + + + + +1 +1 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +212 + + +2 +1 +1 +Alert +./contacts/james_bond +./dev-contacts +200 + + + +276 + + + + + +3 +1 +2 +Put +./devinf11 +200 + + +4 +1 +3 + +application/vnd.syncml-devinf+xml + + + +./devinf11 + + +Small Factory, Ltd. +Tiny Server +Tiny Shop +485749KR +Server + +./contacts +Addressbook + +text/x-vcard +2.1 + + +text/vcard +3.0 + + +text/x-vcard +2.1 + + +text/vcard +3.0 + + + +text/x-vcard +BEGIN +VCARD +END +VCARD +VERSION +2.1 +N +TEL +VOICE +CELL +text/vcard +BEGIN +VCARD +END +VCARD +VERSION +3.0 +N +TEL +VOICE +FAX +CELL + + +01 +02 +07 + + + + + + +5 +201 + + +./dev-contacts + + +./contacts/james_bond + + + +200005021T081812Z +200005022T093223Z + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-004.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-004.nostrtbl.wbxml new file mode 100644 index 0000000..2476fbd Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-004.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-004.wbxml b/test/fixtures/upstream/syncml/syncml-004.wbxml new file mode 100644 index 0000000..357e889 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-004.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-004.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-004.wbxml.canonical.xml new file mode 100644 index 0000000..b6898b8 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-004.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.111IMEI:493005100592800http://www.syncml.org/sync-serversyncml:auth-basicQnJ1Y2UyOk9oQmVoYXZl110SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800212211Alert./contacts/james_bond./dev-contacts200276312Put./devinf11200413application/vnd.syncml-devinf+xml./devinf11Small Factory, Ltd.Tiny ServerTiny Shop485749KRServer./contactsAddressbooktext/x-vcard2.1text/vcard3.0text/x-vcard2.1text/vcard3.0text/x-vcardBEGINVCARDENDVCARDVERSION2.1NTELVOICECELLtext/vcardBEGINVCARDENDVCARDVERSION3.0NTELVOICEFAXCELL0102075201./dev-contacts./contacts/james_bond200005021T081812Z200005022T093223Z \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-004.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-004.wbxml.compact.xml new file mode 100644 index 0000000..b6898b8 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-004.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.111IMEI:493005100592800http://www.syncml.org/sync-serversyncml:auth-basicQnJ1Y2UyOk9oQmVoYXZl110SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800212211Alert./contacts/james_bond./dev-contacts200276312Put./devinf11200413application/vnd.syncml-devinf+xml./devinf11Small Factory, Ltd.Tiny ServerTiny Shop485749KRServer./contactsAddressbooktext/x-vcard2.1text/vcard3.0text/x-vcard2.1text/vcard3.0text/x-vcardBEGINVCARDENDVCARDVERSION2.1NTELVOICECELLtext/vcardBEGINVCARDENDVCARDVERSION3.0NTELVOICEFAXCELL0102075201./dev-contacts./contacts/james_bond200005021T081812Z200005022T093223Z \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-004.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-004.wbxml.indent2.xml new file mode 100644 index 0000000..b57157e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-004.wbxml.indent2.xml @@ -0,0 +1,147 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + + IMEI:493005100592800 + + + http://www.syncml.org/sync-server + + + + syncml:auth-basic + + QnJ1Y2UyOk9oQmVoYXZl + + + + + 1 + 1 + 0 + SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 212 + + + 2 + 1 + 1 + Alert + ./contacts/james_bond + ./dev-contacts + 200 + + + + 276 + + + + + + 3 + 1 + 2 + Put + ./devinf11 + 200 + + + 4 + 1 + 3 + + application/vnd.syncml-devinf+xml + + + + ./devinf11 + + + Small Factory, Ltd. + Tiny Server + Tiny Shop + 485749KR + Server + + ./contacts + Addressbook + + text/x-vcard + 2.1 + + + text/vcard + 3.0 + + + text/x-vcard + 2.1 + + + text/vcard + 3.0 + + + + text/x-vcard + BEGIN + VCARD + END + VCARD + VERSION + 2.1 + N + TEL + VOICE + CELL + text/vcard + BEGIN + VCARD + END + VCARD + VERSION + 3.0 + N + TEL + VOICE + FAX + CELL + + + 01 + 02 + 07 + + + + + + + 5 + 201 + + + ./dev-contacts + + + ./contacts/james_bond + + + + 200005021T081812Z + 200005022T093223Z + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-004.wbxml.xml b/test/fixtures/upstream/syncml/syncml-004.wbxml.xml new file mode 100644 index 0000000..41b45b0 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-004.wbxml.xml @@ -0,0 +1,147 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + +syncml:auth-basic + +QnJ1Y2UyOk9oQmVoYXZl + + + + +1 +1 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +212 + + +2 +1 +1 +Alert +./contacts/james_bond +./dev-contacts +200 + + + +276 + + + + + +3 +1 +2 +Put +./devinf11 +200 + + +4 +1 +3 + +application/vnd.syncml-devinf+xml + + + +./devinf11 + + +Small Factory, Ltd. +Tiny Server +Tiny Shop +485749KR +Server + +./contacts +Addressbook + +text/x-vcard +2.1 + + +text/vcard +3.0 + + +text/x-vcard +2.1 + + +text/vcard +3.0 + + + +text/x-vcard +BEGIN +VCARD +END +VCARD +VERSION +2.1 +N +TEL +VOICE +CELL +text/vcard +BEGIN +VCARD +END +VCARD +VERSION +3.0 +N +TEL +VOICE +FAX +CELL + + +01 +02 +07 + + + + + + +5 +201 + + +./dev-contacts + + +./contacts/james_bond + + + +200005021T081812Z +200005022T093223Z + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-004.xml b/test/fixtures/upstream/syncml/syncml-004.xml new file mode 100644 index 0000000..33edd95 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-004.xml @@ -0,0 +1,123 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + IMEI:493005100592800 + http://www.syncml.org/sync-server + + syncml:auth-basic + QnJ1Y2UyOk9oQmVoYXZl + + + + + 1 + 10SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 212 + + + 2 + 11Alert + ./contacts/james_bond + ./dev-contacts + 200 + + 276 + + + + 3 + 12Put + ./devinf11 + 200 + + + 4 + 13 + application/vnd.syncml-devinf+xml + + ./devinf11 + + + Small Factory, Ltd. + Tiny Server + Tiny Shop + 485749KR + Server + + ./contacts + Addressbook + + text/x-vcard + 2.1 + + + text/vcard + 3.0 + + + text/x-vcard + 2.1 + + + text/vcard + 3.0 + + + + text/x-vcard + BEGIN + VCARD + END + VCARD + VERSION + 2.1 + N + TEL + VOICE + CELL + text/vcard + BEGIN + VCARD + END + VCARD + VERSION + 3.0 + N + TEL + VOICE + FAX + CELL + + + 01 + 02 + 07 + + + + + + + 5 + 201 + + ./dev-contacts + ./contacts/james_bond + + + 200005021T081812Z + 200005022T093223Z + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-005.anon.wbxml b/test/fixtures/upstream/syncml/syncml-005.anon.wbxml new file mode 100644 index 0000000..a6928d5 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-005.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-005.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-005.anon.wbxml.xml new file mode 100644 index 0000000..fb3d11e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-005.anon.wbxml.xml @@ -0,0 +1,71 @@ + + + + +1.1 +SyncML/1.1 +1 +2 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + +1 +1 +0 +SyncHdr +IMEI:493005100592800 +http://www.syncml.org/sync-server +212 + + +2 +1 +5 +Alert +./dev-contacts +./contacts/james_bond +200 + + + +200005022T093223Z + + + + + +3 + +./contacts/james_bond + + +./dev-contacts + + + +8100 +81 + + + +4 + +text/x-vcard + + + +1012 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-005.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-005.nostrtbl.wbxml new file mode 100644 index 0000000..8181293 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-005.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-005.wbxml b/test/fixtures/upstream/syncml/syncml-005.wbxml new file mode 100644 index 0000000..a6928d5 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-005.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-005.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-005.wbxml.canonical.xml new file mode 100644 index 0000000..de8591d --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-005.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.112http://www.syncml.org/sync-serverIMEI:493005100592800110SyncHdrIMEI:493005100592800http://www.syncml.org/sync-server212215Alert./dev-contacts./contacts/james_bond200200005022T093223Z3./contacts/james_bond./dev-contacts8100814text/x-vcard1012 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-005.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-005.wbxml.compact.xml new file mode 100644 index 0000000..de8591d --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-005.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.112http://www.syncml.org/sync-serverIMEI:493005100592800110SyncHdrIMEI:493005100592800http://www.syncml.org/sync-server212215Alert./dev-contacts./contacts/james_bond200200005022T093223Z3./contacts/james_bond./dev-contacts8100814text/x-vcard1012 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-005.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-005.wbxml.indent2.xml new file mode 100644 index 0000000..c95b867 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-005.wbxml.indent2.xml @@ -0,0 +1,71 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 2 + + http://www.syncml.org/sync-server + + + IMEI:493005100592800 + + + + + 1 + 1 + 0 + SyncHdr + IMEI:493005100592800 + http://www.syncml.org/sync-server + 212 + + + 2 + 1 + 5 + Alert + ./dev-contacts + ./contacts/james_bond + 200 + + + + 200005022T093223Z + + + + + + 3 + + ./contacts/james_bond + + + ./dev-contacts + + + + 8100 + 81 + + + + 4 + + text/x-vcard + + + + 1012 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-005.wbxml.xml b/test/fixtures/upstream/syncml/syncml-005.wbxml.xml new file mode 100644 index 0000000..fb3d11e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-005.wbxml.xml @@ -0,0 +1,71 @@ + + + + +1.1 +SyncML/1.1 +1 +2 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + +1 +1 +0 +SyncHdr +IMEI:493005100592800 +http://www.syncml.org/sync-server +212 + + +2 +1 +5 +Alert +./dev-contacts +./contacts/james_bond +200 + + + +200005022T093223Z + + + + + +3 + +./contacts/james_bond + + +./dev-contacts + + + +8100 +81 + + + +4 + +text/x-vcard + + + +1012 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-005.xml b/test/fixtures/upstream/syncml/syncml-005.xml new file mode 100644 index 0000000..689d048 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-005.xml @@ -0,0 +1,55 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 2 + http://www.syncml.org/sync-server + IMEI:493005100592800 + + + + 1 + 10SyncHdr + IMEI:493005100592800 + http://www.syncml.org/sync-server + 212 + + + 2 + 15Alert + ./dev-contacts + ./contacts/james_bond + 200 + + + 200005022T093223Z + + + + + 3 + ./contacts/james_bond + ./dev-contacts + + + 8100 + + 81 + + + + + 4 + text/x-vcard + + 1012 + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-006.anon.wbxml b/test/fixtures/upstream/syncml/syncml-006.anon.wbxml new file mode 100644 index 0000000..4cc4464 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-006.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-006.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-006.anon.wbxml.xml new file mode 100644 index 0000000..bff0f4c --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-006.anon.wbxml.xml @@ -0,0 +1,78 @@ + + + + +1.1 +SyncML/1.1 +1 +2 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +2 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +200 + + +2 +2 +3 +Sync +./contacts/james_bond +./dev-contacts +200 + + +3 +2 +4 +Replace +1012 +200 + + +4 + +./dev-contacts + + +./contacts/james_bond + + +5 + +text/x-vcard + + + +1023 + + + + + +6 + +text/x-vcard + + + +10536681 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-006.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-006.nostrtbl.wbxml new file mode 100644 index 0000000..34add7d Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-006.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-006.wbxml b/test/fixtures/upstream/syncml/syncml-006.wbxml new file mode 100644 index 0000000..4cc4464 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-006.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-006.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-006.wbxml.canonical.xml new file mode 100644 index 0000000..a2e9c11 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-006.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.112IMEI:493005100592800http://www.syncml.org/sync-server120SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800200223Sync./contacts/james_bond./dev-contacts200324Replace10122004./dev-contacts./contacts/james_bond5text/x-vcard10236text/x-vcard10536681 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-006.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-006.wbxml.compact.xml new file mode 100644 index 0000000..a2e9c11 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-006.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.112IMEI:493005100592800http://www.syncml.org/sync-server120SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800200223Sync./contacts/james_bond./dev-contacts200324Replace10122004./dev-contacts./contacts/james_bond5text/x-vcard10236text/x-vcard10536681 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-006.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-006.wbxml.indent2.xml new file mode 100644 index 0000000..0580739 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-006.wbxml.indent2.xml @@ -0,0 +1,78 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 2 + + IMEI:493005100592800 + + + http://www.syncml.org/sync-server + + + + + 1 + 2 + 0 + SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 200 + + + 2 + 2 + 3 + Sync + ./contacts/james_bond + ./dev-contacts + 200 + + + 3 + 2 + 4 + Replace + 1012 + 200 + + + 4 + + ./dev-contacts + + + ./contacts/james_bond + + + 5 + + text/x-vcard + + + + 1023 + + + + + + 6 + + text/x-vcard + + + + 10536681 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-006.wbxml.xml b/test/fixtures/upstream/syncml/syncml-006.wbxml.xml new file mode 100644 index 0000000..bff0f4c --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-006.wbxml.xml @@ -0,0 +1,78 @@ + + + + +1.1 +SyncML/1.1 +1 +2 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +2 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +200 + + +2 +2 +3 +Sync +./contacts/james_bond +./dev-contacts +200 + + +3 +2 +4 +Replace +1012 +200 + + +4 + +./dev-contacts + + +./contacts/james_bond + + +5 + +text/x-vcard + + + +1023 + + + + + +6 + +text/x-vcard + + + +10536681 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-006.xml b/test/fixtures/upstream/syncml/syncml-006.xml new file mode 100644 index 0000000..2613d0e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-006.xml @@ -0,0 +1,56 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 2 + IMEI:493005100592800 + http://www.syncml.org/sync-server + + + + 1 + 20SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 200 + + + 2 + 23Sync + ./contacts/james_bond + ./dev-contacts + 200 + + + 3 + 24Replace + 1012 + 200 + + + 4 + ./dev-contacts + ./contacts/james_bond + + 5 + text/x-vcard + + 1023 + + + + + 6 + text/x-vcard + + 10536681 + + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-007.anon.wbxml b/test/fixtures/upstream/syncml/syncml-007.anon.wbxml new file mode 100644 index 0000000..e5f89d8 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-007.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-007.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-007.anon.wbxml.xml new file mode 100644 index 0000000..614ff42 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-007.anon.wbxml.xml @@ -0,0 +1,70 @@ + + + + +1.1 +SyncML/1.1 +1 +3 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + +1 +2 +0 +SyncHdr +IMEI:493005100592800 +http://www.syncml.org/sync-server +200 + + +2 +2 +4 +Sync +./dev-contacts +./contacts/james_bond +200 + + +3 +2 +5 +Replace +1023 +200 + + +4 +2 +6 +Add +10536681 +200 + + +5 + +./contacts/james_bond + + +./dev-contacts + + + +10536681 + + +1024 + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-007.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-007.nostrtbl.wbxml new file mode 100644 index 0000000..46702e2 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-007.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-007.wbxml b/test/fixtures/upstream/syncml/syncml-007.wbxml new file mode 100644 index 0000000..e5f89d8 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-007.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-007.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-007.wbxml.canonical.xml new file mode 100644 index 0000000..49b0558 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-007.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.113http://www.syncml.org/sync-serverIMEI:493005100592800120SyncHdrIMEI:493005100592800http://www.syncml.org/sync-server200224Sync./dev-contacts./contacts/james_bond200325Replace1023200426Add105366812005./contacts/james_bond./dev-contacts105366811024 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-007.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-007.wbxml.compact.xml new file mode 100644 index 0000000..49b0558 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-007.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.113http://www.syncml.org/sync-serverIMEI:493005100592800120SyncHdrIMEI:493005100592800http://www.syncml.org/sync-server200224Sync./dev-contacts./contacts/james_bond200325Replace1023200426Add105366812005./contacts/james_bond./dev-contacts105366811024 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-007.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-007.wbxml.indent2.xml new file mode 100644 index 0000000..da769f7 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-007.wbxml.indent2.xml @@ -0,0 +1,70 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 3 + + http://www.syncml.org/sync-server + + + IMEI:493005100592800 + + + + + 1 + 2 + 0 + SyncHdr + IMEI:493005100592800 + http://www.syncml.org/sync-server + 200 + + + 2 + 2 + 4 + Sync + ./dev-contacts + ./contacts/james_bond + 200 + + + 3 + 2 + 5 + Replace + 1023 + 200 + + + 4 + 2 + 6 + Add + 10536681 + 200 + + + 5 + + ./contacts/james_bond + + + ./dev-contacts + + + + 10536681 + + + 1024 + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-007.wbxml.xml b/test/fixtures/upstream/syncml/syncml-007.wbxml.xml new file mode 100644 index 0000000..614ff42 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-007.wbxml.xml @@ -0,0 +1,70 @@ + + + + +1.1 +SyncML/1.1 +1 +3 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + + +1 +2 +0 +SyncHdr +IMEI:493005100592800 +http://www.syncml.org/sync-server +200 + + +2 +2 +4 +Sync +./dev-contacts +./contacts/james_bond +200 + + +3 +2 +5 +Replace +1023 +200 + + +4 +2 +6 +Add +10536681 +200 + + +5 + +./contacts/james_bond + + +./dev-contacts + + + +10536681 + + +1024 + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-007.xml b/test/fixtures/upstream/syncml/syncml-007.xml new file mode 100644 index 0000000..4e23ac0 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-007.xml @@ -0,0 +1,50 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 3 + http://www.syncml.org/sync-server + IMEI:493005100592800 + + + + 1 + 20SyncHdr + IMEI:493005100592800 + http://www.syncml.org/sync-server + 200 + + + 2 + 24Sync + ./dev-contacts + ./contacts/james_bond + 200 + + + 3 + 25Replace + 1023 + 200 + + + 4 + 26Add + 10536681 + 200 + + + 5 + ./contacts/james_bond + ./dev-contacts + + 10536681 + 1024 + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-008.anon.wbxml b/test/fixtures/upstream/syncml/syncml-008.anon.wbxml new file mode 100644 index 0000000..c3972cb Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-008.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-008.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-008.anon.wbxml.xml new file mode 100644 index 0000000..c38c74b --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-008.anon.wbxml.xml @@ -0,0 +1,37 @@ + + + + +1.1 +SyncML/1.1 +1 +3 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +3 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +200 + + +1 +3 +5 +Map +./contacts/james_bond +./dev-contacts +200 + + + + diff --git a/test/fixtures/upstream/syncml/syncml-008.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-008.nostrtbl.wbxml new file mode 100644 index 0000000..5388f04 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-008.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-008.wbxml b/test/fixtures/upstream/syncml/syncml-008.wbxml new file mode 100644 index 0000000..c3972cb Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-008.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-008.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-008.wbxml.canonical.xml new file mode 100644 index 0000000..b7782cd --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-008.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.113IMEI:493005100592800http://www.syncml.org/sync-server130SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800200135Map./contacts/james_bond./dev-contacts200 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-008.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-008.wbxml.compact.xml new file mode 100644 index 0000000..b7782cd --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-008.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.113IMEI:493005100592800http://www.syncml.org/sync-server130SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800200135Map./contacts/james_bond./dev-contacts200 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-008.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-008.wbxml.indent2.xml new file mode 100644 index 0000000..0ec6845 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-008.wbxml.indent2.xml @@ -0,0 +1,37 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 3 + + IMEI:493005100592800 + + + http://www.syncml.org/sync-server + + + + + 1 + 3 + 0 + SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 200 + + + 1 + 3 + 5 + Map + ./contacts/james_bond + ./dev-contacts + 200 + + + + diff --git a/test/fixtures/upstream/syncml/syncml-008.wbxml.xml b/test/fixtures/upstream/syncml/syncml-008.wbxml.xml new file mode 100644 index 0000000..c38c74b --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-008.wbxml.xml @@ -0,0 +1,37 @@ + + + + +1.1 +SyncML/1.1 +1 +3 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +3 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +200 + + +1 +3 +5 +Map +./contacts/james_bond +./dev-contacts +200 + + + + diff --git a/test/fixtures/upstream/syncml/syncml-008.xml b/test/fixtures/upstream/syncml/syncml-008.xml new file mode 100644 index 0000000..4a132b5 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-008.xml @@ -0,0 +1,29 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 3 + IMEI:493005100592800 + http://www.syncml.org/sync-server + + + + 1 + 30SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 200 + + + 1 + 35Map + ./contacts/james_bond + ./dev-contacts + 200 + + + + diff --git a/test/fixtures/upstream/syncml/syncml-009.anon.wbxml b/test/fixtures/upstream/syncml/syncml-009.anon.wbxml new file mode 100644 index 0000000..c791646 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-009.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-009.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-009.anon.wbxml.xml new file mode 100644 index 0000000..55f0657 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-009.anon.wbxml.xml @@ -0,0 +1,70 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + +syncml:auth-basic + +QnJ1Y2UyOk9oQmVoYXZl + + + + +1 +200 + + +./contacts/james_bond + + +./dev-contacts + + + +234 +276 + + + + + +2 + +./contacts/james_bond + + +./dev-contacts + + + +8100 +81 + + + +3 + +text/x-vcard + + + +1012 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-009.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-009.nostrtbl.wbxml new file mode 100644 index 0000000..8042ea1 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-009.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-009.wbxml b/test/fixtures/upstream/syncml/syncml-009.wbxml new file mode 100644 index 0000000..c791646 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-009.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-009.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-009.wbxml.canonical.xml new file mode 100644 index 0000000..57aa374 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-009.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.111http://www.syncml.org/sync-serverIMEI:493005100592800syncml:auth-basicQnJ1Y2UyOk9oQmVoYXZl1200./contacts/james_bond./dev-contacts2342762./contacts/james_bond./dev-contacts8100813text/x-vcard1012 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-009.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-009.wbxml.compact.xml new file mode 100644 index 0000000..57aa374 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-009.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.111http://www.syncml.org/sync-serverIMEI:493005100592800syncml:auth-basicQnJ1Y2UyOk9oQmVoYXZl1200./contacts/james_bond./dev-contacts2342762./contacts/james_bond./dev-contacts8100813text/x-vcard1012 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-009.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-009.wbxml.indent2.xml new file mode 100644 index 0000000..c176e33 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-009.wbxml.indent2.xml @@ -0,0 +1,70 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + + http://www.syncml.org/sync-server + + + IMEI:493005100592800 + + + + syncml:auth-basic + + QnJ1Y2UyOk9oQmVoYXZl + + + + + 1 + 200 + + + ./contacts/james_bond + + + ./dev-contacts + + + + 234 + 276 + + + + + + 2 + + ./contacts/james_bond + + + ./dev-contacts + + + + 8100 + 81 + + + + 3 + + text/x-vcard + + + + 1012 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-009.wbxml.xml b/test/fixtures/upstream/syncml/syncml-009.wbxml.xml new file mode 100644 index 0000000..55f0657 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-009.wbxml.xml @@ -0,0 +1,70 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +http://www.syncml.org/sync-server + + +IMEI:493005100592800 + + + +syncml:auth-basic + +QnJ1Y2UyOk9oQmVoYXZl + + + + +1 +200 + + +./contacts/james_bond + + +./dev-contacts + + + +234 +276 + + + + + +2 + +./contacts/james_bond + + +./dev-contacts + + + +8100 +81 + + + +3 + +text/x-vcard + + + +1012 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-009.xml b/test/fixtures/upstream/syncml/syncml-009.xml new file mode 100644 index 0000000..f86e929 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-009.xml @@ -0,0 +1,54 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + http://www.syncml.org/sync-server + IMEI:493005100592800 + + syncml:auth-basic + QnJ1Y2UyOk9oQmVoYXZl + + + + + 1 + 200 + + ./contacts/james_bond + ./dev-contacts + + + 234 + 276 + + + + + + 2 + ./contacts/james_bond + ./dev-contacts + + + 8100 + + 81 + + + + + 3 + text/x-vcard + + 1012 + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-010.anon.wbxml b/test/fixtures/upstream/syncml/syncml-010.anon.wbxml new file mode 100644 index 0000000..3c8670d Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-010.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-010.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-010.anon.wbxml.xml new file mode 100644 index 0000000..21cb180 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-010.anon.wbxml.xml @@ -0,0 +1,112 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +1 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +212 + + +2 +1 +1 +Alert +./contacts/james_bond +./dev-contacts +200 + + + +276 + + + + + +3 +1 +2 +Sync +./contacts/james_bond +./dev-contacts +200 + + +4 +1 +3 +Replace +1012 +200 + + +5 +200 + + +./dev-contacts + + +./contacts/james_bond + + + +200005021T081812Z +200005022T093223Z + + + + + +6 + +./dev-contacts + + +./contacts/james_bond + + +7 + +text/x-vcard + + + +1023 + + + + + +8 + +text/x-vcard + + + +10536681 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-010.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-010.nostrtbl.wbxml new file mode 100644 index 0000000..dcd7079 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-010.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-010.wbxml b/test/fixtures/upstream/syncml/syncml-010.wbxml new file mode 100644 index 0000000..3c8670d Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-010.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-010.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-010.wbxml.canonical.xml new file mode 100644 index 0000000..35cd8b8 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-010.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1SyncML/1.111IMEI:493005100592800http://www.syncml.org/sync-server110SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800212211Alert./contacts/james_bond./dev-contacts200276312Sync./contacts/james_bond./dev-contacts200413Replace10122005200./dev-contacts./contacts/james_bond200005021T081812Z200005022T093223Z6./dev-contacts./contacts/james_bond7text/x-vcard10238text/x-vcard10536681 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-010.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-010.wbxml.compact.xml new file mode 100644 index 0000000..35cd8b8 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-010.wbxml.compact.xml @@ -0,0 +1 @@ +1.1SyncML/1.111IMEI:493005100592800http://www.syncml.org/sync-server110SyncHdrhttp://www.syncml.org/sync-serverIMEI:493005100592800212211Alert./contacts/james_bond./dev-contacts200276312Sync./contacts/james_bond./dev-contacts200413Replace10122005200./dev-contacts./contacts/james_bond200005021T081812Z200005022T093223Z6./dev-contacts./contacts/james_bond7text/x-vcard10238text/x-vcard10536681 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-010.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-010.wbxml.indent2.xml new file mode 100644 index 0000000..2f3948e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-010.wbxml.indent2.xml @@ -0,0 +1,112 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + + IMEI:493005100592800 + + + http://www.syncml.org/sync-server + + + + + 1 + 1 + 0 + SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 212 + + + 2 + 1 + 1 + Alert + ./contacts/james_bond + ./dev-contacts + 200 + + + + 276 + + + + + + 3 + 1 + 2 + Sync + ./contacts/james_bond + ./dev-contacts + 200 + + + 4 + 1 + 3 + Replace + 1012 + 200 + + + 5 + 200 + + + ./dev-contacts + + + ./contacts/james_bond + + + + 200005021T081812Z + 200005022T093223Z + + + + + + 6 + + ./dev-contacts + + + ./contacts/james_bond + + + 7 + + text/x-vcard + + + + 1023 + + + + + + 8 + + text/x-vcard + + + + 10536681 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-010.wbxml.xml b/test/fixtures/upstream/syncml/syncml-010.wbxml.xml new file mode 100644 index 0000000..21cb180 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-010.wbxml.xml @@ -0,0 +1,112 @@ + + + + +1.1 +SyncML/1.1 +1 +1 + +IMEI:493005100592800 + + +http://www.syncml.org/sync-server + + + + +1 +1 +0 +SyncHdr +http://www.syncml.org/sync-server +IMEI:493005100592800 +212 + + +2 +1 +1 +Alert +./contacts/james_bond +./dev-contacts +200 + + + +276 + + + + + +3 +1 +2 +Sync +./contacts/james_bond +./dev-contacts +200 + + +4 +1 +3 +Replace +1012 +200 + + +5 +200 + + +./dev-contacts + + +./contacts/james_bond + + + +200005021T081812Z +200005022T093223Z + + + + + +6 + +./dev-contacts + + +./contacts/james_bond + + +7 + +text/x-vcard + + + +1023 + + + + + +8 + +text/x-vcard + + + +10536681 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-010.xml b/test/fixtures/upstream/syncml/syncml-010.xml new file mode 100644 index 0000000..af6940e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-010.xml @@ -0,0 +1,80 @@ + + + + + 1.1 + SyncML/1.1 + 1 + 1 + IMEI:493005100592800 + http://www.syncml.org/sync-server + + + + 1 + 10SyncHdr + http://www.syncml.org/sync-server + IMEI:493005100592800 + 212 + + + 2 + 11Alert + ./contacts/james_bond + ./dev-contacts + 200 + + 276 + + + + 3 + 12Sync + ./contacts/james_bond + ./dev-contacts + 200 + + + 4 + 13Replace + 1012 + 200 + + + 5 + 200 + + ./dev-contacts + ./contacts/james_bond + + + 200005021T081812Z + 200005022T093223Z + + + + + + 6 + ./dev-contacts + ./contacts/james_bond + + 7 + text/x-vcard + + 1023 + + + + + 8 + text/x-vcard + + 10536681 + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-011.anon.wbxml b/test/fixtures/upstream/syncml/syncml-011.anon.wbxml new file mode 100644 index 0000000..755662e Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-011.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-011.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-011.anon.wbxml.xml new file mode 100644 index 0000000..daa8ce2 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-011.anon.wbxml.xml @@ -0,0 +1,75 @@ + + + +1.1 +Big Factory, Ltd. +4119 +Jane's phones +2.0e +2.0 +1.22I +1218182THD000001-2 +phone + + + + +./contacts +Phonebook +32 + +text/vcard +3.0 + + +text/vcard +3.0 + + +text/x-vcard +2.1 + + +32650 +250 + + +1 +7 + + + +text/x-vcard +BEGIN +VCARD +END +VCARD +VERSION +2.1 +N +TEL +VOICE +FAX +CELL +text/vcard +BEGIN +VCARD +END +VCARD +VERSION +3.0 +N +TEL +VOICE +FAX +CELL + + +srtmsg +Hello World + + +endmsg +Goodbye + + diff --git a/test/fixtures/upstream/syncml/syncml-011.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-011.nostrtbl.wbxml new file mode 100644 index 0000000..57aa40c Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-011.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-011.wbxml b/test/fixtures/upstream/syncml/syncml-011.wbxml new file mode 100644 index 0000000..755662e Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-011.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-011.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-011.wbxml.canonical.xml new file mode 100644 index 0000000..6398d30 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-011.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1Big Factory, Ltd.4119Jane's phones2.0e2.01.22I1218182THD000001-2phone./contactsPhonebook32text/vcard3.0text/vcard3.0text/x-vcard2.13265025017text/x-vcardBEGINVCARDENDVCARDVERSION2.1NTELVOICEFAXCELLtext/vcardBEGINVCARDENDVCARDVERSION3.0NTELVOICEFAXCELLsrtmsgHello WorldendmsgGoodbye \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-011.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-011.wbxml.compact.xml new file mode 100644 index 0000000..6398d30 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-011.wbxml.compact.xml @@ -0,0 +1 @@ +1.1Big Factory, Ltd.4119Jane's phones2.0e2.01.22I1218182THD000001-2phone./contactsPhonebook32text/vcard3.0text/vcard3.0text/x-vcard2.13265025017text/x-vcardBEGINVCARDENDVCARDVERSION2.1NTELVOICEFAXCELLtext/vcardBEGINVCARDENDVCARDVERSION3.0NTELVOICEFAXCELLsrtmsgHello WorldendmsgGoodbye \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-011.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-011.wbxml.indent2.xml new file mode 100644 index 0000000..b0b6a0b --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-011.wbxml.indent2.xml @@ -0,0 +1,75 @@ + + + + 1.1 + Big Factory, Ltd. + 4119 + Jane's phones + 2.0e + 2.0 + 1.22I + 1218182THD000001-2 + phone + + + + + ./contacts + Phonebook + 32 + + text/vcard + 3.0 + + + text/vcard + 3.0 + + + text/x-vcard + 2.1 + + + 32650 + 250 + + + 1 + 7 + + + + text/x-vcard + BEGIN + VCARD + END + VCARD + VERSION + 2.1 + N + TEL + VOICE + FAX + CELL + text/vcard + BEGIN + VCARD + END + VCARD + VERSION + 3.0 + N + TEL + VOICE + FAX + CELL + + + srtmsg + Hello World + + + endmsg + Goodbye + + diff --git a/test/fixtures/upstream/syncml/syncml-011.wbxml.xml b/test/fixtures/upstream/syncml/syncml-011.wbxml.xml new file mode 100644 index 0000000..daa8ce2 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-011.wbxml.xml @@ -0,0 +1,75 @@ + + + +1.1 +Big Factory, Ltd. +4119 +Jane's phones +2.0e +2.0 +1.22I +1218182THD000001-2 +phone + + + + +./contacts +Phonebook +32 + +text/vcard +3.0 + + +text/vcard +3.0 + + +text/x-vcard +2.1 + + +32650 +250 + + +1 +7 + + + +text/x-vcard +BEGIN +VCARD +END +VCARD +VERSION +2.1 +N +TEL +VOICE +FAX +CELL +text/vcard +BEGIN +VCARD +END +VCARD +VERSION +3.0 +N +TEL +VOICE +FAX +CELL + + +srtmsg +Hello World + + +endmsg +Goodbye + + diff --git a/test/fixtures/upstream/syncml/syncml-011.xml b/test/fixtures/upstream/syncml/syncml-011.xml new file mode 100644 index 0000000..c93a39a --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-011.xml @@ -0,0 +1,75 @@ + + + + 1.1 + Big Factory, Ltd. + 4119 + Jane's phones + 2.0e + 2.0 + 1.22I + 1218182THD000001-2 + phone + + + + + ./contacts + Phonebook + 32 + + text/vcard + 3.0 + + + text/vcard + 3.0 + + + text/x-vcard + 2.1 + + + 32650 + 250 + + + 1 + 7 + + + + text/x-vcard + BEGIN + VCARD + END + VCARD + VERSION + 2.1 + N + TEL + VOICE + FAX + CELL + text/vcard + BEGIN + VCARD + END + VCARD + VERSION + 3.0 + N + TEL + VOICE + FAX + CELL + + + srtmsg + Hello World + + + endmsg + Goodbye + + \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-012.anon.wbxml b/test/fixtures/upstream/syncml/syncml-012.anon.wbxml new file mode 100644 index 0000000..04e21ba Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-012.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-012.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-012.anon.wbxml.xml new file mode 100644 index 0000000..13b073b --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-012.anon.wbxml.xml @@ -0,0 +1,48 @@ + + + + +1.1 +DM/1.1 +0 +0 + +My_SyncML_DM_Device + + +http://www.TheUltimateManagementServer.com + + + + +1 + + +./SyncML/DMAcc/UltimateManagement + + +node + + + + + +./SyncML/DMAcc/UltimateManagement/Addr + + + + + +./SyncML/Con/My_ISP + + + + +./SyncML/Con/My_ISP/PX/Addr + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-012.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-012.nostrtbl.wbxml new file mode 100644 index 0000000..04e21ba Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-012.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-012.wbxml b/test/fixtures/upstream/syncml/syncml-012.wbxml new file mode 100644 index 0000000..04e21ba Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-012.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-012.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-012.wbxml.canonical.xml new file mode 100644 index 0000000..2ea51b3 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-012.wbxml.canonical.xml @@ -0,0 +1 @@ +1.1DM/1.100My_SyncML_DM_Devicehttp://www.TheUltimateManagementServer.com1./SyncML/DMAcc/UltimateManagementnode./SyncML/DMAcc/UltimateManagement/Addr./SyncML/Con/My_ISP./SyncML/Con/My_ISP/PX/Addr \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-012.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-012.wbxml.compact.xml new file mode 100644 index 0000000..2ea51b3 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-012.wbxml.compact.xml @@ -0,0 +1 @@ +1.1DM/1.100My_SyncML_DM_Devicehttp://www.TheUltimateManagementServer.com1./SyncML/DMAcc/UltimateManagementnode./SyncML/DMAcc/UltimateManagement/Addr./SyncML/Con/My_ISP./SyncML/Con/My_ISP/PX/Addr \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-012.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-012.wbxml.indent2.xml new file mode 100644 index 0000000..37a448f --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-012.wbxml.indent2.xml @@ -0,0 +1,48 @@ + + + + + 1.1 + DM/1.1 + 0 + 0 + + My_SyncML_DM_Device + + + http://www.TheUltimateManagementServer.com + + + + + 1 + + + ./SyncML/DMAcc/UltimateManagement + + + node + + + + + + ./SyncML/DMAcc/UltimateManagement/Addr + + + + + + ./SyncML/Con/My_ISP + + + + + ./SyncML/Con/My_ISP/PX/Addr + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-012.wbxml.xml b/test/fixtures/upstream/syncml/syncml-012.wbxml.xml new file mode 100644 index 0000000..13b073b --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-012.wbxml.xml @@ -0,0 +1,48 @@ + + + + +1.1 +DM/1.1 +0 +0 + +My_SyncML_DM_Device + + +http://www.TheUltimateManagementServer.com + + + + +1 + + +./SyncML/DMAcc/UltimateManagement + + +node + + + + + +./SyncML/DMAcc/UltimateManagement/Addr + + + + + +./SyncML/Con/My_ISP + + + + +./SyncML/Con/My_ISP/PX/Addr + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-012.xml b/test/fixtures/upstream/syncml/syncml-012.xml new file mode 100644 index 0000000..f8d6d8e --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-012.xml @@ -0,0 +1,51 @@ + + + + + 1.1 + DM/1.1 + 0 + 0 + + My_SyncML_DM_Device + + + http://www.TheUltimateManagementServer.com + + + + + 1 + + + + ./SyncML/DMAcc/UltimateManagement + + + + node + + + + + + ./SyncML/DMAcc/UltimateManagement/Addr + + www.TheUltimateManagementServer.com + + + + ./SyncML/Con/My_ISP + + + + + ./SyncML/Con/My_ISP/PX/Addr + + 123.123.123.123 + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-013.anon.wbxml b/test/fixtures/upstream/syncml/syncml-013.anon.wbxml new file mode 100644 index 0000000..f7322b4 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-013.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-013.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-013.anon.wbxml.xml new file mode 100644 index 0000000..58dd93c --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-013.anon.wbxml.xml @@ -0,0 +1,34 @@ + + + + + + +6 + +text/x-vcard + + + +pas-id-3F4B790300000000 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-013.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-013.nostrtbl.wbxml new file mode 100644 index 0000000..eebe4e2 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-013.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-013.wbxml b/test/fixtures/upstream/syncml/syncml-013.wbxml new file mode 100644 index 0000000..f7322b4 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-013.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-013.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-013.wbxml.canonical.xml new file mode 100644 index 0000000..ffbf2ac --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-013.wbxml.canonical.xml @@ -0,0 +1,14 @@ +6text/x-vcardpas-id-3F4B790300000000 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-013.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-013.wbxml.compact.xml new file mode 100644 index 0000000..ffbf2ac --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-013.wbxml.compact.xml @@ -0,0 +1,14 @@ +6text/x-vcardpas-id-3F4B790300000000 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-013.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-013.wbxml.indent2.xml new file mode 100644 index 0000000..947ad4b --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-013.wbxml.indent2.xml @@ -0,0 +1,34 @@ + + + + + + + 6 + + text/x-vcard + + + + pas-id-3F4B790300000000 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-013.wbxml.xml b/test/fixtures/upstream/syncml/syncml-013.wbxml.xml new file mode 100644 index 0000000..58dd93c --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-013.wbxml.xml @@ -0,0 +1,34 @@ + + + + + + +6 + +text/x-vcard + + + +pas-id-3F4B790300000000 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-013.xml b/test/fixtures/upstream/syncml/syncml-013.xml new file mode 100644 index 0000000..9a024a7 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-013.xml @@ -0,0 +1,32 @@ + + + + + + + 6 + text/x-vcard + + + pas-id-3F4B790300000000 + + BEGIN:VCARD +VERSION:2.1 +X-EVOLUTION-FILE-AS:Ximian, Inc. +N: +LABEL;WORK;ENCODING=QUOTED-PRINTABLE:401 Park Drive 3 West=0ABoston, MA +02215=0AUSA +TEL;WORK;VOICE:(617) 236-0442 +TEL;WORK;FAX:(617) 236-8630 +EMAIL;INTERNET:[EMAIL PROTECTED] +URL:www.ximian.com/ +ORG:Ximian, Inc. +NOTE:Welcome to the Ximian Addressbook. +UID:pas-id-3F4B790300000000 +END:VCARD + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-014.anon.wbxml b/test/fixtures/upstream/syncml/syncml-014.anon.wbxml new file mode 100644 index 0000000..fd59fcd Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-014.anon.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-014.anon.wbxml.xml b/test/fixtures/upstream/syncml/syncml-014.anon.wbxml.xml new file mode 100644 index 0000000..e4ffc7f --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-014.anon.wbxml.xml @@ -0,0 +1,35 @@ + + + + + + +6 + +text/x-vcard + + + +pas-id-3F4B790300000000 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-014.nostrtbl.wbxml b/test/fixtures/upstream/syncml/syncml-014.nostrtbl.wbxml new file mode 100644 index 0000000..a873234 Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-014.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-014.wbxml b/test/fixtures/upstream/syncml/syncml-014.wbxml new file mode 100644 index 0000000..fd59fcd Binary files /dev/null and b/test/fixtures/upstream/syncml/syncml-014.wbxml differ diff --git a/test/fixtures/upstream/syncml/syncml-014.wbxml.canonical.xml b/test/fixtures/upstream/syncml/syncml-014.wbxml.canonical.xml new file mode 100644 index 0000000..8e7b108 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-014.wbxml.canonical.xml @@ -0,0 +1,15 @@ +6text/x-vcardpas-id-3F4B790300000000 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-014.wbxml.compact.xml b/test/fixtures/upstream/syncml/syncml-014.wbxml.compact.xml new file mode 100644 index 0000000..8e7b108 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-014.wbxml.compact.xml @@ -0,0 +1,15 @@ +6text/x-vcardpas-id-3F4B790300000000 \ No newline at end of file diff --git a/test/fixtures/upstream/syncml/syncml-014.wbxml.indent2.xml b/test/fixtures/upstream/syncml/syncml-014.wbxml.indent2.xml new file mode 100644 index 0000000..0066b55 --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-014.wbxml.indent2.xml @@ -0,0 +1,35 @@ + + + + + + + 6 + + text/x-vcard + + + + pas-id-3F4B790300000000 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-014.wbxml.xml b/test/fixtures/upstream/syncml/syncml-014.wbxml.xml new file mode 100644 index 0000000..e4ffc7f --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-014.wbxml.xml @@ -0,0 +1,35 @@ + + + + + + +6 + +text/x-vcard + + + +pas-id-3F4B790300000000 + + + + + + + + diff --git a/test/fixtures/upstream/syncml/syncml-014.xml b/test/fixtures/upstream/syncml/syncml-014.xml new file mode 100644 index 0000000..04eea5a --- /dev/null +++ b/test/fixtures/upstream/syncml/syncml-014.xml @@ -0,0 +1,34 @@ + + + + + + + 6 + text/x-vcard + + + pas-id-3F4B790300000000 + + + + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/wv/wv-001.anon.wbxml b/test/fixtures/upstream/wv/wv-001.anon.wbxml new file mode 100644 index 0000000..da24152 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-001.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-001.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-001.anon.wbxml.xml new file mode 100644 index 0000000..6ce00a6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-001.anon.wbxml.xml @@ -0,0 +1,37 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +201 +Partially successful. + +531 +Unknown user. +wv:bad_user1@im.com +wv:bad_user2@im.com + + +532 +Blocked. +wv:bad_user3@im.com +wv:bad_user4@im.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-001.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-001.nostrtbl.wbxml new file mode 100644 index 0000000..da24152 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-001.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-001.wbxml b/test/fixtures/upstream/wv/wv-001.wbxml new file mode 100644 index 0000000..da24152 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-001.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-001.wbxml.xml b/test/fixtures/upstream/wv/wv-001.wbxml.xml new file mode 100644 index 0000000..6ce00a6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-001.wbxml.xml @@ -0,0 +1,37 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +201 +Partially successful. + +531 +Unknown user. +wv:bad_user1@im.com +wv:bad_user2@im.com + + +532 +Blocked. +wv:bad_user3@im.com +wv:bad_user4@im.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-001.xml b/test/fixtures/upstream/wv/wv-001.xml new file mode 100644 index 0000000..8875f99 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-001.xml @@ -0,0 +1,52 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 201 + + Partially successful. + + + 531 + + Unknown user. + + wv:bad_user1@im.com + + wv:bad_user2@im.com + + + + 532 + + Blocked. + + wv:bad_user3@im.com + + wv:bad_user4@im.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-002.anon.wbxml b/test/fixtures/upstream/wv/wv-002.anon.wbxml new file mode 100644 index 0000000..f609567 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-002.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-002.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-002.anon.wbxml.xml new file mode 100644 index 0000000..c9443a7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-002.anon.wbxml.xml @@ -0,0 +1,20 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request + +The Wireless Village initiative: CSP DTD and examples v1.1 WV-023 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-002.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-002.nostrtbl.wbxml new file mode 100644 index 0000000..f609567 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-002.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-002.wbxml b/test/fixtures/upstream/wv/wv-002.wbxml new file mode 100644 index 0000000..f609567 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-002.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-002.wbxml.xml b/test/fixtures/upstream/wv/wv-002.wbxml.xml new file mode 100644 index 0000000..c9443a7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-002.wbxml.xml @@ -0,0 +1,20 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request + +The Wireless Village initiative: CSP DTD and examples v1.1 WV-023 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-002.xml b/test/fixtures/upstream/wv/wv-002.xml new file mode 100644 index 0000000..3dfc2c7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-002.xml @@ -0,0 +1,25 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + + + The Wireless Village initiative: CSP DTD and examples v1.1 WV-023 + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-003.anon.wbxml b/test/fixtures/upstream/wv/wv-003.anon.wbxml new file mode 100644 index 0000000..85c7f6f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-003.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-003.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-003.anon.wbxml.xml new file mode 100644 index 0000000..f5cba1e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-003.anon.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + +wv:user@im.com + +http://206.226.10.25:80/IMPSAPP + +1my2pass3word +120 +im.user.com#20011224#328746293 + + + + + diff --git a/test/fixtures/upstream/wv/wv-003.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-003.nostrtbl.wbxml new file mode 100644 index 0000000..85c7f6f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-003.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-003.wbxml b/test/fixtures/upstream/wv/wv-003.wbxml new file mode 100644 index 0000000..85c7f6f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-003.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-003.wbxml.xml b/test/fixtures/upstream/wv/wv-003.wbxml.xml new file mode 100644 index 0000000..f5cba1e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-003.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + +wv:user@im.com + +http://206.226.10.25:80/IMPSAPP + +1my2pass3word +120 +im.user.com#20011224#328746293 + + + + + diff --git a/test/fixtures/upstream/wv/wv-003.xml b/test/fixtures/upstream/wv/wv-003.xml new file mode 100644 index 0000000..00b6d10 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-003.xml @@ -0,0 +1,34 @@ + + + + + + Outband + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:user@im.com + + + http://206.226.10.25:80/IMPSAPP + + + 1my2pass3word + + 120 + + im.user.com#20011224#328746293 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-004.anon.wbxml b/test/fixtures/upstream/wv/wv-004.anon.wbxml new file mode 100644 index 0000000..9ca8f3e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-004.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-004.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-004.anon.wbxml.xml new file mode 100644 index 0000000..ebc5716 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-004.anon.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +200 +Successfully logged in. + +im.user.com#48815@server.com +120 +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-004.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-004.nostrtbl.wbxml new file mode 100644 index 0000000..9ca8f3e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-004.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-004.wbxml b/test/fixtures/upstream/wv/wv-004.wbxml new file mode 100644 index 0000000..9ca8f3e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-004.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-004.wbxml.xml b/test/fixtures/upstream/wv/wv-004.wbxml.xml new file mode 100644 index 0000000..ebc5716 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-004.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +200 +Successfully logged in. + +im.user.com#48815@server.com +120 +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-004.xml b/test/fixtures/upstream/wv/wv-004.xml new file mode 100644 index 0000000..c79f9d0 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-004.xml @@ -0,0 +1,40 @@ + + + + + + Outband + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + http://206.226.10.25:80/IMPSAPP + + + + 200 + + Successfully logged in. + + + im.user.com#48815@server.com + + 120 + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-005.anon.wbxml b/test/fixtures/upstream/wv/wv-005.anon.wbxml new file mode 100644 index 0000000..5d0ad08 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-005.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-005.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-005.anon.wbxml.xml new file mode 100644 index 0000000..c065751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-005.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + +wv:user@im.com + +http://206.226.10.25:80/IMPSAPP + +PWD,SHA,MD4,MD5,MD6 +im.user.com#20011224#328746293 + + + + + diff --git a/test/fixtures/upstream/wv/wv-005.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-005.nostrtbl.wbxml new file mode 100644 index 0000000..5d0ad08 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-005.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-005.wbxml b/test/fixtures/upstream/wv/wv-005.wbxml new file mode 100644 index 0000000..5d0ad08 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-005.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-005.wbxml.xml b/test/fixtures/upstream/wv/wv-005.wbxml.xml new file mode 100644 index 0000000..c065751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-005.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + +wv:user@im.com + +http://206.226.10.25:80/IMPSAPP + +PWD,SHA,MD4,MD5,MD6 +im.user.com#20011224#328746293 + + + + + diff --git a/test/fixtures/upstream/wv/wv-005.xml b/test/fixtures/upstream/wv/wv-005.xml new file mode 100644 index 0000000..58c8304 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-005.xml @@ -0,0 +1,32 @@ + + + + + + Outband + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:user@im.com + + + http://206.226.10.25:80/IMPSAPP + + + PWD,SHA,MD4,MD5,MD6 + + im.user.com#20011224#328746293 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-006.anon.wbxml b/test/fixtures/upstream/wv/wv-006.anon.wbxml new file mode 100644 index 0000000..2028f55 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-006.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-006.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-006.anon.wbxml.xml new file mode 100644 index 0000000..96d3c76 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-006.anon.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +200 +Successfully logged in. + +92387rhf934fho3fh9fkn309fn3pfun304ufn3 +MD6 +F + + + + + diff --git a/test/fixtures/upstream/wv/wv-006.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-006.nostrtbl.wbxml new file mode 100644 index 0000000..2028f55 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-006.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-006.wbxml b/test/fixtures/upstream/wv/wv-006.wbxml new file mode 100644 index 0000000..2028f55 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-006.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-006.wbxml.xml b/test/fixtures/upstream/wv/wv-006.wbxml.xml new file mode 100644 index 0000000..96d3c76 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-006.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +200 +Successfully logged in. + +92387rhf934fho3fh9fkn309fn3pfun304ufn3 +MD6 +F + + + + + diff --git a/test/fixtures/upstream/wv/wv-006.xml b/test/fixtures/upstream/wv/wv-006.xml new file mode 100644 index 0000000..7343ccc --- /dev/null +++ b/test/fixtures/upstream/wv/wv-006.xml @@ -0,0 +1,40 @@ + + + + + + Outband + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + http://206.226.10.25:80/IMPSAPP + + + + 200 + + Successfully logged in. + + + 92387rhf934fho3fh9fkn309fn3pfun304ufn3 + + MD6 + + F + + + + + + diff --git a/test/fixtures/upstream/wv/wv-007.anon.wbxml b/test/fixtures/upstream/wv/wv-007.anon.wbxml new file mode 100644 index 0000000..f9e5dd0 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-007.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-007.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-007.anon.wbxml.xml new file mode 100644 index 0000000..ea7e258 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-007.anon.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + +wv:user@im.com + +http://206.226.10.25:80/IMPSAPP + +alkkuayfdsAKDSJfsdfjhksadhlkasdlkfgsal +120 +im.user.com#20011224#328746293 + + + + + diff --git a/test/fixtures/upstream/wv/wv-007.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-007.nostrtbl.wbxml new file mode 100644 index 0000000..f9e5dd0 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-007.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-007.wbxml b/test/fixtures/upstream/wv/wv-007.wbxml new file mode 100644 index 0000000..f9e5dd0 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-007.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-007.wbxml.xml b/test/fixtures/upstream/wv/wv-007.wbxml.xml new file mode 100644 index 0000000..ea7e258 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-007.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + +wv:user@im.com + +http://206.226.10.25:80/IMPSAPP + +alkkuayfdsAKDSJfsdfjhksadhlkasdlkfgsal +120 +im.user.com#20011224#328746293 + + + + + diff --git a/test/fixtures/upstream/wv/wv-007.xml b/test/fixtures/upstream/wv/wv-007.xml new file mode 100644 index 0000000..d7812a9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-007.xml @@ -0,0 +1,34 @@ + + + + + + Outband + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:user@im.com + + + http://206.226.10.25:80/IMPSAPP + + + alkkuayfdsAKDSJfsdfjhksadhlkasdlkfgsal + + 120 + + im.user.com#20011224#328746293 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-008.anon.wbxml b/test/fixtures/upstream/wv/wv-008.anon.wbxml new file mode 100644 index 0000000..9ca8f3e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-008.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-008.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-008.anon.wbxml.xml new file mode 100644 index 0000000..ebc5716 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-008.anon.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +200 +Successfully logged in. + +im.user.com#48815@server.com +120 +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-008.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-008.nostrtbl.wbxml new file mode 100644 index 0000000..9ca8f3e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-008.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-008.wbxml b/test/fixtures/upstream/wv/wv-008.wbxml new file mode 100644 index 0000000..9ca8f3e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-008.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-008.wbxml.xml b/test/fixtures/upstream/wv/wv-008.wbxml.xml new file mode 100644 index 0000000..ebc5716 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-008.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +200 +Successfully logged in. + +im.user.com#48815@server.com +120 +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-008.xml b/test/fixtures/upstream/wv/wv-008.xml new file mode 100644 index 0000000..c79f9d0 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-008.xml @@ -0,0 +1,40 @@ + + + + + + Outband + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + http://206.226.10.25:80/IMPSAPP + + + + 200 + + Successfully logged in. + + + im.user.com#48815@server.com + + 120 + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-009.anon.wbxml b/test/fixtures/upstream/wv/wv-009.anon.wbxml new file mode 100644 index 0000000..1984dbb Binary files /dev/null and b/test/fixtures/upstream/wv/wv-009.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-009.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-009.anon.wbxml.xml new file mode 100644 index 0000000..085e7b2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-009.anon.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +http://206.226.10.25:80/IMPSAPP + + + + + + + + +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-009.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-009.nostrtbl.wbxml new file mode 100644 index 0000000..1984dbb Binary files /dev/null and b/test/fixtures/upstream/wv/wv-009.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-009.wbxml b/test/fixtures/upstream/wv/wv-009.wbxml new file mode 100644 index 0000000..1984dbb Binary files /dev/null and b/test/fixtures/upstream/wv/wv-009.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-009.wbxml.xml b/test/fixtures/upstream/wv/wv-009.wbxml.xml new file mode 100644 index 0000000..085e7b2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-009.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +http://206.226.10.25:80/IMPSAPP + + + + + + + + +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-009.xml b/test/fixtures/upstream/wv/wv-009.xml new file mode 100644 index 0000000..58fd05b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-009.xml @@ -0,0 +1,40 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + http://206.226.10.25:80/IMPSAPP + + + + + + + + + + + + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-010.anon.wbxml b/test/fixtures/upstream/wv/wv-010.anon.wbxml new file mode 100644 index 0000000..fecfb83 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-010.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-010.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-010.anon.wbxml.xml new file mode 100644 index 0000000..2a5fd26 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-010.anon.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-010.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-010.nostrtbl.wbxml new file mode 100644 index 0000000..fecfb83 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-010.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-010.wbxml b/test/fixtures/upstream/wv/wv-010.wbxml new file mode 100644 index 0000000..fecfb83 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-010.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-010.wbxml.xml b/test/fixtures/upstream/wv/wv-010.wbxml.xml new file mode 100644 index 0000000..2a5fd26 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-010.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-010.xml b/test/fixtures/upstream/wv/wv-010.xml new file mode 100644 index 0000000..13755a0 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-010.xml @@ -0,0 +1,42 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + http://206.226.10.25:80/IMPSAPP + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-011.anon.wbxml b/test/fixtures/upstream/wv/wv-011.anon.wbxml new file mode 100644 index 0000000..ea9d708 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-011.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-011.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-011.anon.wbxml.xml new file mode 100644 index 0000000..66387f5 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-011.anon.wbxml.xml @@ -0,0 +1,44 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +http://206.226.10.25:80/IMPSAPP + + +MOBILE_PHONE +P +text/plain; charset=us-ascii +application/x-sms +text/x-vCard; charset=us-ascii +text/x-vCalendar; charset=us-ascii +BASE64 +32767 +SMS +WSP +HTTP +1 +32767 +WAPSMS +WAPUDP +SUDP +STCP +91 +2 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-011.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-011.nostrtbl.wbxml new file mode 100644 index 0000000..ea9d708 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-011.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-011.wbxml b/test/fixtures/upstream/wv/wv-011.wbxml new file mode 100644 index 0000000..ea9d708 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-011.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-011.wbxml.xml b/test/fixtures/upstream/wv/wv-011.wbxml.xml new file mode 100644 index 0000000..66387f5 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-011.wbxml.xml @@ -0,0 +1,44 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +http://206.226.10.25:80/IMPSAPP + + +MOBILE_PHONE +P +text/plain; charset=us-ascii +application/x-sms +text/x-vCard; charset=us-ascii +text/x-vCalendar; charset=us-ascii +BASE64 +32767 +SMS +WSP +HTTP +1 +32767 +WAPSMS +WAPUDP +SUDP +STCP +91 +2 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-011.xml b/test/fixtures/upstream/wv/wv-011.xml new file mode 100644 index 0000000..c2b5a74 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-011.xml @@ -0,0 +1,68 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + http://206.226.10.25:80/IMPSAPP + + + + MOBILE_PHONE + + P + + text/plain; charset=us-ascii + + application/x-sms + + text/x-vCard; charset=us-ascii + + text/x-vCalendar; charset=us-ascii + + BASE64 + + 32767 + + SMS + + WSP + + HTTP + + 1 + + 32767 + + WAPSMS + + WAPUDP + + SUDP + + STCP + + 91 + + 2 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-012.anon.wbxml b/test/fixtures/upstream/wv/wv-012.anon.wbxml new file mode 100644 index 0000000..ef615dc Binary files /dev/null and b/test/fixtures/upstream/wv/wv-012.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-012.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-012.anon.wbxml.xml new file mode 100644 index 0000000..ca2afa7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-012.anon.wbxml.xml @@ -0,0 +1,47 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +MOBILE_PHONE +P +text/plain; charset=us-ascii +application/x-sms +text/x-vCard; charset=us-ascii +text/x-vCalendar; charset=us-ascii +BASE64 +32767 +SMS +WSP +HTTP +1 +32767 +WAPSMS +WAPUDP +SUDP +STCP +91 +100.100.100.100 +98 +3 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-012.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-012.nostrtbl.wbxml new file mode 100644 index 0000000..ef615dc Binary files /dev/null and b/test/fixtures/upstream/wv/wv-012.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-012.wbxml b/test/fixtures/upstream/wv/wv-012.wbxml new file mode 100644 index 0000000..ef615dc Binary files /dev/null and b/test/fixtures/upstream/wv/wv-012.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-012.wbxml.xml b/test/fixtures/upstream/wv/wv-012.wbxml.xml new file mode 100644 index 0000000..ca2afa7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-012.wbxml.xml @@ -0,0 +1,47 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + + +MOBILE_PHONE +P +text/plain; charset=us-ascii +application/x-sms +text/x-vCard; charset=us-ascii +text/x-vCalendar; charset=us-ascii +BASE64 +32767 +SMS +WSP +HTTP +1 +32767 +WAPSMS +WAPUDP +SUDP +STCP +91 +100.100.100.100 +98 +3 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-012.xml b/test/fixtures/upstream/wv/wv-012.xml new file mode 100644 index 0000000..0e00194 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-012.xml @@ -0,0 +1,74 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + http://206.226.10.25:80/IMPSAPP + + + + MOBILE_PHONE + + P + + text/plain; charset=us-ascii + + application/x-sms + + text/x-vCard; charset=us-ascii + + text/x-vCalendar; charset=us-ascii + + BASE64 + + 32767 + + SMS + + WSP + + HTTP + + 1 + + 32767 + + WAPSMS + + WAPUDP + + SUDP + + STCP + + 91 + + 100.100.100.100 + + 98 + + 3 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-013.anon.wbxml b/test/fixtures/upstream/wv/wv-013.anon.wbxml new file mode 100644 index 0000000..be21a7e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-013.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-013.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-013.anon.wbxml.xml new file mode 100644 index 0000000..a6a04bf --- /dev/null +++ b/test/fixtures/upstream/wv/wv-013.anon.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-013.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-013.nostrtbl.wbxml new file mode 100644 index 0000000..be21a7e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-013.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-013.wbxml b/test/fixtures/upstream/wv/wv-013.wbxml new file mode 100644 index 0000000..be21a7e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-013.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-013.wbxml.xml b/test/fixtures/upstream/wv/wv-013.wbxml.xml new file mode 100644 index 0000000..a6a04bf --- /dev/null +++ b/test/fixtures/upstream/wv/wv-013.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-013.xml b/test/fixtures/upstream/wv/wv-013.xml new file mode 100644 index 0000000..dc33cec --- /dev/null +++ b/test/fixtures/upstream/wv/wv-013.xml @@ -0,0 +1,24 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-014.anon.wbxml b/test/fixtures/upstream/wv/wv-014.anon.wbxml new file mode 100644 index 0000000..5d8027a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-014.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-014.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-014.anon.wbxml.xml new file mode 100644 index 0000000..7a96731 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-014.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-014.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-014.nostrtbl.wbxml new file mode 100644 index 0000000..5d8027a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-014.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-014.wbxml b/test/fixtures/upstream/wv/wv-014.wbxml new file mode 100644 index 0000000..5d8027a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-014.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-014.wbxml.xml b/test/fixtures/upstream/wv/wv-014.wbxml.xml new file mode 100644 index 0000000..7a96731 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-014.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-014.xml b/test/fixtures/upstream/wv/wv-014.xml new file mode 100644 index 0000000..9fda75c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-014.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-015.anon.wbxml b/test/fixtures/upstream/wv/wv-015.anon.wbxml new file mode 100644 index 0000000..306454d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-015.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-015.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-015.anon.wbxml.xml new file mode 100644 index 0000000..95221f3 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-015.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +601 +Updating server software. All services offline for 3 hours. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-015.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-015.nostrtbl.wbxml new file mode 100644 index 0000000..306454d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-015.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-015.wbxml b/test/fixtures/upstream/wv/wv-015.wbxml new file mode 100644 index 0000000..306454d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-015.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-015.wbxml.xml b/test/fixtures/upstream/wv/wv-015.wbxml.xml new file mode 100644 index 0000000..95221f3 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-015.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +601 +Updating server software. All services offline for 3 hours. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-015.xml b/test/fixtures/upstream/wv/wv-015.xml new file mode 100644 index 0000000..c043029 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-015.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 601 + + Updating server software. All services offline for 3 hours. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-016.anon.wbxml b/test/fixtures/upstream/wv/wv-016.anon.wbxml new file mode 100644 index 0000000..f622e66 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-016.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-016.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-016.anon.wbxml.xml new file mode 100644 index 0000000..4a9b83e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-016.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +20 + + + + + diff --git a/test/fixtures/upstream/wv/wv-016.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-016.nostrtbl.wbxml new file mode 100644 index 0000000..f622e66 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-016.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-016.wbxml b/test/fixtures/upstream/wv/wv-016.wbxml new file mode 100644 index 0000000..f622e66 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-016.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-016.wbxml.xml b/test/fixtures/upstream/wv/wv-016.wbxml.xml new file mode 100644 index 0000000..4a9b83e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-016.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +20 + + + + + diff --git a/test/fixtures/upstream/wv/wv-016.xml b/test/fixtures/upstream/wv/wv-016.xml new file mode 100644 index 0000000..d9da61b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-016.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + 20 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-017.anon.wbxml b/test/fixtures/upstream/wv/wv-017.anon.wbxml new file mode 100644 index 0000000..6b06e47 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-017.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-017.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-017.anon.wbxml.xml new file mode 100644 index 0000000..eda054e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-017.anon.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + +120 + + + + + diff --git a/test/fixtures/upstream/wv/wv-017.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-017.nostrtbl.wbxml new file mode 100644 index 0000000..6b06e47 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-017.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-017.wbxml b/test/fixtures/upstream/wv/wv-017.wbxml new file mode 100644 index 0000000..6b06e47 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-017.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-017.wbxml.xml b/test/fixtures/upstream/wv/wv-017.wbxml.xml new file mode 100644 index 0000000..eda054e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-017.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + +120 + + + + + diff --git a/test/fixtures/upstream/wv/wv-017.xml b/test/fixtures/upstream/wv/wv-017.xml new file mode 100644 index 0000000..a92976e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-017.xml @@ -0,0 +1,34 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + 120 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-018.anon.wbxml b/test/fixtures/upstream/wv/wv-018.anon.wbxml new file mode 100644 index 0000000..f369b28 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-018.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-018.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-018.anon.wbxml.xml new file mode 100644 index 0000000..87612cc --- /dev/null +++ b/test/fixtures/upstream/wv/wv-018.anon.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + + +http://206.226.10.25:80/IMPSAPP + + + + + + diff --git a/test/fixtures/upstream/wv/wv-018.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-018.nostrtbl.wbxml new file mode 100644 index 0000000..f369b28 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-018.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-018.wbxml b/test/fixtures/upstream/wv/wv-018.wbxml new file mode 100644 index 0000000..f369b28 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-018.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-018.wbxml.xml b/test/fixtures/upstream/wv/wv-018.wbxml.xml new file mode 100644 index 0000000..87612cc --- /dev/null +++ b/test/fixtures/upstream/wv/wv-018.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 + + + + +http://206.226.10.25:80/IMPSAPP + + + + + + diff --git a/test/fixtures/upstream/wv/wv-018.xml b/test/fixtures/upstream/wv/wv-018.xml new file mode 100644 index 0000000..5621851 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-018.xml @@ -0,0 +1,26 @@ + + + + + + Outband + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + http://206.226.10.25:80/IMPSAPP + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-019.anon.wbxml b/test/fixtures/upstream/wv/wv-019.anon.wbxml new file mode 100644 index 0000000..ae207ca Binary files /dev/null and b/test/fixtures/upstream/wv/wv-019.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-019.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-019.anon.wbxml.xml new file mode 100644 index 0000000..f49609d --- /dev/null +++ b/test/fixtures/upstream/wv/wv-019.anon.wbxml.xml @@ -0,0 +1,32 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + +Fake Chocholate Co. + +application/vnd.wap.mms-message +1234 +BASE64 +Base64EncodedDataHere + +We make the fakest chocholate in the world! +http://www.fake-chocholate.co.uk + + + + + diff --git a/test/fixtures/upstream/wv/wv-019.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-019.nostrtbl.wbxml new file mode 100644 index 0000000..ae207ca Binary files /dev/null and b/test/fixtures/upstream/wv/wv-019.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-019.wbxml b/test/fixtures/upstream/wv/wv-019.wbxml new file mode 100644 index 0000000..ae207ca Binary files /dev/null and b/test/fixtures/upstream/wv/wv-019.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-019.wbxml.xml b/test/fixtures/upstream/wv/wv-019.wbxml.xml new file mode 100644 index 0000000..f49609d --- /dev/null +++ b/test/fixtures/upstream/wv/wv-019.wbxml.xml @@ -0,0 +1,32 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +http://206.226.10.25:80/IMPSAPP + +Fake Chocholate Co. + +application/vnd.wap.mms-message +1234 +BASE64 +Base64EncodedDataHere + +We make the fakest chocholate in the world! +http://www.fake-chocholate.co.uk + + + + + diff --git a/test/fixtures/upstream/wv/wv-019.xml b/test/fixtures/upstream/wv/wv-019.xml new file mode 100644 index 0000000..09a8ff1 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-019.xml @@ -0,0 +1,44 @@ + + + + + + Outband + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + http://206.226.10.25:80/IMPSAPP + + + Fake Chocholate Co. + + + application/vnd.wap.mms-message + + 1234 + + BASE64 + + Base64EncodedDataHere + + + We make the fakest chocholate in the world! + + http://www.fake-chocholate.co.uk + + + + + + diff --git a/test/fixtures/upstream/wv/wv-020.anon.wbxml b/test/fixtures/upstream/wv/wv-020.anon.wbxml new file mode 100644 index 0000000..a43dd5a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-020.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-020.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-020.anon.wbxml.xml new file mode 100644 index 0000000..450c5bb --- /dev/null +++ b/test/fixtures/upstream/wv/wv-020.anon.wbxml.xml @@ -0,0 +1,29 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +USER_LAST_NAME +Smith + + +USER_ONLINE_STATUS +T + +5 + + + + + diff --git a/test/fixtures/upstream/wv/wv-020.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-020.nostrtbl.wbxml new file mode 100644 index 0000000..a43dd5a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-020.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-020.wbxml b/test/fixtures/upstream/wv/wv-020.wbxml new file mode 100644 index 0000000..a43dd5a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-020.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-020.wbxml.xml b/test/fixtures/upstream/wv/wv-020.wbxml.xml new file mode 100644 index 0000000..450c5bb --- /dev/null +++ b/test/fixtures/upstream/wv/wv-020.wbxml.xml @@ -0,0 +1,29 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +USER_LAST_NAME +Smith + + +USER_ONLINE_STATUS +T + +5 + + + + + diff --git a/test/fixtures/upstream/wv/wv-020.xml b/test/fixtures/upstream/wv/wv-020.xml new file mode 100644 index 0000000..dbb8bdc --- /dev/null +++ b/test/fixtures/upstream/wv/wv-020.xml @@ -0,0 +1,38 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + USER_LAST_NAME + + Smith + + + + USER_ONLINE_STATUS + + T + + + 5 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-021.anon.wbxml b/test/fixtures/upstream/wv/wv-021.anon.wbxml new file mode 100644 index 0000000..22a0d23 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-021.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-021.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-021.anon.wbxml.xml new file mode 100644 index 0000000..24e9110 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-021.anon.wbxml.xml @@ -0,0 +1,44 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + +595760001 +7 +F +5 + + + +wv:he@there.com + + +wv:she@there.com + + +wv:matthias@salamander.com + + +wv:francisco@don.com + + +wv:john@smith.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-021.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-021.nostrtbl.wbxml new file mode 100644 index 0000000..22a0d23 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-021.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-021.wbxml b/test/fixtures/upstream/wv/wv-021.wbxml new file mode 100644 index 0000000..22a0d23 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-021.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-021.wbxml.xml b/test/fixtures/upstream/wv/wv-021.wbxml.xml new file mode 100644 index 0000000..24e9110 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-021.wbxml.xml @@ -0,0 +1,44 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + +595760001 +7 +F +5 + + + +wv:he@there.com + + +wv:she@there.com + + +wv:matthias@salamander.com + + +wv:francisco@don.com + + +wv:john@smith.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-021.xml b/test/fixtures/upstream/wv/wv-021.xml new file mode 100644 index 0000000..c392960 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-021.xml @@ -0,0 +1,59 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 0x23829381 + + 7 + + F + + 5 + + + + + wv:he@there.com + + + + wv:she@there.com + + + + wv:matthias@salamander.com + + + + wv:francisco@don.com + + + + wv:john@smith.com + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-022.anon.wbxml b/test/fixtures/upstream/wv/wv-022.anon.wbxml new file mode 100644 index 0000000..07ff353 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-022.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-022.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-022.anon.wbxml.xml new file mode 100644 index 0000000..ab7699b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-022.anon.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 + + + +595760001 +6 + + + + + diff --git a/test/fixtures/upstream/wv/wv-022.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-022.nostrtbl.wbxml new file mode 100644 index 0000000..07ff353 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-022.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-022.wbxml b/test/fixtures/upstream/wv/wv-022.wbxml new file mode 100644 index 0000000..07ff353 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-022.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-022.wbxml.xml b/test/fixtures/upstream/wv/wv-022.wbxml.xml new file mode 100644 index 0000000..ab7699b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-022.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 + + + +595760001 +6 + + + + + diff --git a/test/fixtures/upstream/wv/wv-022.xml b/test/fixtures/upstream/wv/wv-022.xml new file mode 100644 index 0000000..8ba87a7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-022.xml @@ -0,0 +1,29 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12346@NOK5110 + + + + + + 0x23829381 + + 6 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-023.anon.wbxml b/test/fixtures/upstream/wv/wv-023.anon.wbxml new file mode 100644 index 0000000..ebb01af Binary files /dev/null and b/test/fixtures/upstream/wv/wv-023.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-023.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-023.anon.wbxml.xml new file mode 100644 index 0000000..5811fb8 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-023.anon.wbxml.xml @@ -0,0 +1,35 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 +F + + + +595760001 +7 +T +7 + + + +wv:mary@site.com + + +wv:anna@server.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-023.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-023.nostrtbl.wbxml new file mode 100644 index 0000000..ebb01af Binary files /dev/null and b/test/fixtures/upstream/wv/wv-023.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-023.wbxml b/test/fixtures/upstream/wv/wv-023.wbxml new file mode 100644 index 0000000..ebb01af Binary files /dev/null and b/test/fixtures/upstream/wv/wv-023.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-023.wbxml.xml b/test/fixtures/upstream/wv/wv-023.wbxml.xml new file mode 100644 index 0000000..5811fb8 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-023.wbxml.xml @@ -0,0 +1,35 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 +F + + + +595760001 +7 +T +7 + + + +wv:mary@site.com + + +wv:anna@server.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-023.xml b/test/fixtures/upstream/wv/wv-023.xml new file mode 100644 index 0000000..00b4053 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-023.xml @@ -0,0 +1,47 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + F + + + + + + 0x23829381 + + 7 + + T + + 7 + + + + + wv:mary@site.com + + + + wv:anna@server.com + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-024.anon.wbxml b/test/fixtures/upstream/wv/wv-024.anon.wbxml new file mode 100644 index 0000000..934da21 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-024.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-024.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-024.anon.wbxml.xml new file mode 100644 index 0000000..0d2b299 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-024.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12347@NOK5110 + + + +595760001 + + + + + diff --git a/test/fixtures/upstream/wv/wv-024.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-024.nostrtbl.wbxml new file mode 100644 index 0000000..934da21 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-024.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-024.wbxml b/test/fixtures/upstream/wv/wv-024.wbxml new file mode 100644 index 0000000..934da21 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-024.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-024.wbxml.xml b/test/fixtures/upstream/wv/wv-024.wbxml.xml new file mode 100644 index 0000000..0d2b299 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-024.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12347@NOK5110 + + + +595760001 + + + + + diff --git a/test/fixtures/upstream/wv/wv-024.xml b/test/fixtures/upstream/wv/wv-024.xml new file mode 100644 index 0000000..9ef6822 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-024.xml @@ -0,0 +1,27 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12347@NOK5110 + + + + + + 0x23829381 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-025.anon.wbxml b/test/fixtures/upstream/wv/wv-025.anon.wbxml new file mode 100644 index 0000000..0104fd3 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-025.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-025.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-025.anon.wbxml.xml new file mode 100644 index 0000000..745d483 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-025.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12347@NOK5110 +F + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-025.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-025.nostrtbl.wbxml new file mode 100644 index 0000000..0104fd3 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-025.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-025.wbxml b/test/fixtures/upstream/wv/wv-025.wbxml new file mode 100644 index 0000000..0104fd3 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-025.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-025.wbxml.xml b/test/fixtures/upstream/wv/wv-025.wbxml.xml new file mode 100644 index 0000000..745d483 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-025.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12347@NOK5110 +F + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-025.xml b/test/fixtures/upstream/wv/wv-025.xml new file mode 100644 index 0000000..5116d5a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-025.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12347@NOK5110 + + F + + + + + + 200 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-026.anon.wbxml b/test/fixtures/upstream/wv/wv-026.anon.wbxml new file mode 100644 index 0000000..0c1a9a1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-026.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-026.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-026.anon.wbxml.xml new file mode 100644 index 0000000..8809845 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-026.anon.wbxml.xml @@ -0,0 +1,43 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x38382025 +GR + + +wv:he@there.com + + +wv:she@there.com + + + +Johnny +wv:john/partygroup@there.com + + + +wv:john/partygroup@there.com +Come to party! You have 10 minutes! + +WV +wv:john/partygroup@there.com + +600 + + + + + diff --git a/test/fixtures/upstream/wv/wv-026.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-026.nostrtbl.wbxml new file mode 100644 index 0000000..0c1a9a1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-026.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-026.wbxml b/test/fixtures/upstream/wv/wv-026.wbxml new file mode 100644 index 0000000..0c1a9a1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-026.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-026.wbxml.xml b/test/fixtures/upstream/wv/wv-026.wbxml.xml new file mode 100644 index 0000000..8809845 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-026.wbxml.xml @@ -0,0 +1,43 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x38382025 +GR + + +wv:he@there.com + + +wv:she@there.com + + + +Johnny +wv:john/partygroup@there.com + + + +wv:john/partygroup@there.com +Come to party! You have 10 minutes! + +WV +wv:john/partygroup@there.com + +600 + + + + + diff --git a/test/fixtures/upstream/wv/wv-026.xml b/test/fixtures/upstream/wv/wv-026.xml new file mode 100644 index 0000000..1b9760a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-026.xml @@ -0,0 +1,58 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + 0x38382025 + + GR + + + + wv:he@there.com + + + + wv:she@there.com + + + + + Johnny + + wv:john/partygroup@there.com + + + + + wv:john/partygroup@there.com + + Come to party! You have 10 minutes! + + + WV + + wv:john/partygroup@there.com + + + 600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-027.anon.wbxml b/test/fixtures/upstream/wv/wv-027.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-027.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-027.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-027.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-027.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-027.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-027.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-027.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-027.wbxml b/test/fixtures/upstream/wv/wv-027.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-027.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-027.wbxml.xml b/test/fixtures/upstream/wv/wv-027.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-027.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-027.xml b/test/fixtures/upstream/wv/wv-027.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-027.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-028.anon.wbxml b/test/fixtures/upstream/wv/wv-028.anon.wbxml new file mode 100644 index 0000000..cd0ff2e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-028.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-028.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-028.anon.wbxml.xml new file mode 100644 index 0000000..aa2208e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-028.anon.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 +F + + + +0x38382025 +GR + + + +WV +wv:john/partygroup@there.com + + + +wv:john/partygroup@there.com +Come to party! +600 + + + + + diff --git a/test/fixtures/upstream/wv/wv-028.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-028.nostrtbl.wbxml new file mode 100644 index 0000000..cd0ff2e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-028.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-028.wbxml b/test/fixtures/upstream/wv/wv-028.wbxml new file mode 100644 index 0000000..cd0ff2e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-028.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-028.wbxml.xml b/test/fixtures/upstream/wv/wv-028.wbxml.xml new file mode 100644 index 0000000..aa2208e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-028.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 +F + + + +0x38382025 +GR + + + +WV +wv:john/partygroup@there.com + + + +wv:john/partygroup@there.com +Come to party! +600 + + + + + diff --git a/test/fixtures/upstream/wv/wv-028.xml b/test/fixtures/upstream/wv/wv-028.xml new file mode 100644 index 0000000..32c4f3f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-028.xml @@ -0,0 +1,46 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12346@NOK5110 + + F + + + + + 0x38382025 + + GR + + + + + WV + + wv:john/partygroup@there.com + + + + + wv:john/partygroup@there.com + + Come to party! + + 600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-029.anon.wbxml b/test/fixtures/upstream/wv/wv-029.anon.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-029.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-029.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-029.anon.wbxml.xml new file mode 100644 index 0000000..2e64677 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-029.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-029.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-029.nostrtbl.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-029.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-029.wbxml b/test/fixtures/upstream/wv/wv-029.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-029.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-029.wbxml.xml b/test/fixtures/upstream/wv/wv-029.wbxml.xml new file mode 100644 index 0000000..2e64677 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-029.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-029.xml b/test/fixtures/upstream/wv/wv-029.xml new file mode 100644 index 0000000..4274e4e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-029.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-030.anon.wbxml b/test/fixtures/upstream/wv/wv-030.anon.wbxml new file mode 100644 index 0000000..4b50682 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-030.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-030.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-030.anon.wbxml.xml new file mode 100644 index 0000000..3c0c389 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-030.anon.wbxml.xml @@ -0,0 +1,27 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12347@NOK5110 + + + +0x38382025 +T +OK, just a sec! + +Johnny +wv:john/partygroup@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-030.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-030.nostrtbl.wbxml new file mode 100644 index 0000000..4b50682 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-030.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-030.wbxml b/test/fixtures/upstream/wv/wv-030.wbxml new file mode 100644 index 0000000..4b50682 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-030.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-030.wbxml.xml b/test/fixtures/upstream/wv/wv-030.wbxml.xml new file mode 100644 index 0000000..3c0c389 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-030.wbxml.xml @@ -0,0 +1,27 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12347@NOK5110 + + + +0x38382025 +T +OK, just a sec! + +Johnny +wv:john/partygroup@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-030.xml b/test/fixtures/upstream/wv/wv-030.xml new file mode 100644 index 0000000..dde6a8f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-030.xml @@ -0,0 +1,36 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12347@NOK5110 + + + + + 0x38382025 + + T + + OK, just a sec! + + + Johnny + + wv:john/partygroup@there.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-031.anon.wbxml b/test/fixtures/upstream/wv/wv-031.anon.wbxml new file mode 100644 index 0000000..f6afb80 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-031.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-031.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-031.anon.wbxml.xml new file mode 100644 index 0000000..1864bc2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-031.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12347@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-031.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-031.nostrtbl.wbxml new file mode 100644 index 0000000..f6afb80 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-031.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-031.wbxml b/test/fixtures/upstream/wv/wv-031.wbxml new file mode 100644 index 0000000..f6afb80 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-031.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-031.wbxml.xml b/test/fixtures/upstream/wv/wv-031.wbxml.xml new file mode 100644 index 0000000..1864bc2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-031.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12347@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-031.xml b/test/fixtures/upstream/wv/wv-031.xml new file mode 100644 index 0000000..4ddca7a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-031.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12347@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-032.anon.wbxml b/test/fixtures/upstream/wv/wv-032.anon.wbxml new file mode 100644 index 0000000..11429d9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-032.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-032.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-032.anon.wbxml.xml new file mode 100644 index 0000000..b7a2cbe --- /dev/null +++ b/test/fixtures/upstream/wv/wv-032.anon.wbxml.xml @@ -0,0 +1,32 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12348@NOK5110 +F + + + +0x38382025 +T + + + +WV +wv:john/partygroup@there.com + + + +OK, just a sec! + + + + + diff --git a/test/fixtures/upstream/wv/wv-032.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-032.nostrtbl.wbxml new file mode 100644 index 0000000..11429d9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-032.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-032.wbxml b/test/fixtures/upstream/wv/wv-032.wbxml new file mode 100644 index 0000000..11429d9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-032.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-032.wbxml.xml b/test/fixtures/upstream/wv/wv-032.wbxml.xml new file mode 100644 index 0000000..b7a2cbe --- /dev/null +++ b/test/fixtures/upstream/wv/wv-032.wbxml.xml @@ -0,0 +1,32 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12348@NOK5110 +F + + + +0x38382025 +T + + + +WV +wv:john/partygroup@there.com + + + +OK, just a sec! + + + + + diff --git a/test/fixtures/upstream/wv/wv-032.xml b/test/fixtures/upstream/wv/wv-032.xml new file mode 100644 index 0000000..556cd5e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-032.xml @@ -0,0 +1,42 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12348@NOK5110 + + F + + + + + 0x38382025 + + T + + + + + WV + + wv:john/partygroup@there.com + + + + + OK, just a sec! + + + + + + diff --git a/test/fixtures/upstream/wv/wv-033.anon.wbxml b/test/fixtures/upstream/wv/wv-033.anon.wbxml new file mode 100644 index 0000000..47b0501 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-033.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-033.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-033.anon.wbxml.xml new file mode 100644 index 0000000..77e20e5 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-033.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12348@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-033.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-033.nostrtbl.wbxml new file mode 100644 index 0000000..47b0501 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-033.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-033.wbxml b/test/fixtures/upstream/wv/wv-033.wbxml new file mode 100644 index 0000000..47b0501 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-033.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-033.wbxml.xml b/test/fixtures/upstream/wv/wv-033.wbxml.xml new file mode 100644 index 0000000..77e20e5 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-033.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12348@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-033.xml b/test/fixtures/upstream/wv/wv-033.xml new file mode 100644 index 0000000..4913624 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-033.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12348@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-034.anon.wbxml b/test/fixtures/upstream/wv/wv-034.anon.wbxml new file mode 100644 index 0000000..cbe285f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-034.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-034.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-034.anon.wbxml.xml new file mode 100644 index 0000000..7e13fa4 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-034.anon.wbxml.xml @@ -0,0 +1,40 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x38382025 + + +wv:he@there.com + + +wv:she@there.com + + + +Johnny +wv:john/partygroup@there.com + + + +Time is up! + +WV +wv:john/partygroup@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-034.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-034.nostrtbl.wbxml new file mode 100644 index 0000000..cbe285f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-034.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-034.wbxml b/test/fixtures/upstream/wv/wv-034.wbxml new file mode 100644 index 0000000..cbe285f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-034.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-034.wbxml.xml b/test/fixtures/upstream/wv/wv-034.wbxml.xml new file mode 100644 index 0000000..7e13fa4 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-034.wbxml.xml @@ -0,0 +1,40 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x38382025 + + +wv:he@there.com + + +wv:she@there.com + + + +Johnny +wv:john/partygroup@there.com + + + +Time is up! + +WV +wv:john/partygroup@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-034.xml b/test/fixtures/upstream/wv/wv-034.xml new file mode 100644 index 0000000..4bd8c69 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-034.xml @@ -0,0 +1,52 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + 0x38382025 + + + + wv:he@there.com + + + + wv:she@there.com + + + + + Johnny + + wv:john/partygroup@there.com + + + + + Time is up! + + + WV + + wv:john/partygroup@there.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-035.anon.wbxml b/test/fixtures/upstream/wv/wv-035.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-035.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-035.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-035.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-035.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-035.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-035.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-035.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-035.wbxml b/test/fixtures/upstream/wv/wv-035.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-035.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-035.wbxml.xml b/test/fixtures/upstream/wv/wv-035.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-035.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-035.xml b/test/fixtures/upstream/wv/wv-035.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-035.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-036.anon.wbxml b/test/fixtures/upstream/wv/wv-036.anon.wbxml new file mode 100644 index 0000000..85bd103 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-036.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-036.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-036.anon.wbxml.xml new file mode 100644 index 0000000..f33b635 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-036.anon.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 +F + + + +0x38382025 + + + +WV +wv:john/partygroup@there.com + + + +Time is up! + + + + + diff --git a/test/fixtures/upstream/wv/wv-036.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-036.nostrtbl.wbxml new file mode 100644 index 0000000..85bd103 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-036.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-036.wbxml b/test/fixtures/upstream/wv/wv-036.wbxml new file mode 100644 index 0000000..85bd103 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-036.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-036.wbxml.xml b/test/fixtures/upstream/wv/wv-036.wbxml.xml new file mode 100644 index 0000000..f33b635 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-036.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 +F + + + +0x38382025 + + + +WV +wv:john/partygroup@there.com + + + +Time is up! + + + + + diff --git a/test/fixtures/upstream/wv/wv-036.xml b/test/fixtures/upstream/wv/wv-036.xml new file mode 100644 index 0000000..e0b014b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-036.xml @@ -0,0 +1,40 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12346@NOK5110 + + F + + + + + 0x38382025 + + + + + WV + + wv:john/partygroup@there.com + + + + + Time is up! + + + + + + diff --git a/test/fixtures/upstream/wv/wv-037.anon.wbxml b/test/fixtures/upstream/wv/wv-037.anon.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-037.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-037.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-037.anon.wbxml.xml new file mode 100644 index 0000000..2e64677 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-037.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-037.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-037.nostrtbl.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-037.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-037.wbxml b/test/fixtures/upstream/wv/wv-037.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-037.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-037.wbxml.xml b/test/fixtures/upstream/wv/wv-037.wbxml.xml new file mode 100644 index 0000000..2e64677 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-037.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-037.xml b/test/fixtures/upstream/wv/wv-037.xml new file mode 100644 index 0000000..4274e4e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-037.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-038.anon.wbxml b/test/fixtures/upstream/wv/wv-038.anon.wbxml new file mode 100644 index 0000000..31dd5a4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-038.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-038.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-038.anon.wbxml.xml new file mode 100644 index 0000000..f8aa3e3 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-038.anon.wbxml.xml @@ -0,0 +1,40 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/ContactList-5@smith.com + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-038.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-038.nostrtbl.wbxml new file mode 100644 index 0000000..31dd5a4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-038.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-038.wbxml b/test/fixtures/upstream/wv/wv-038.wbxml new file mode 100644 index 0000000..31dd5a4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-038.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-038.wbxml.xml b/test/fixtures/upstream/wv/wv-038.wbxml.xml new file mode 100644 index 0000000..f8aa3e3 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-038.wbxml.xml @@ -0,0 +1,40 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/ContactList-5@smith.com + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-038.xml b/test/fixtures/upstream/wv/wv-038.xml new file mode 100644 index 0000000..b868df9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-038.xml @@ -0,0 +1,62 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/ContactList-5@smith.com + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-039.anon.wbxml b/test/fixtures/upstream/wv/wv-039.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-039.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-039.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-039.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-039.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-039.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-039.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-039.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-039.wbxml b/test/fixtures/upstream/wv/wv-039.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-039.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-039.wbxml.xml b/test/fixtures/upstream/wv/wv-039.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-039.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-039.xml b/test/fixtures/upstream/wv/wv-039.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-039.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-040.anon.wbxml b/test/fixtures/upstream/wv/wv-040.anon.wbxml new file mode 100644 index 0000000..e9dde71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-040.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-040.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-040.anon.wbxml.xml new file mode 100644 index 0000000..c4235c0 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-040.anon.wbxml.xml @@ -0,0 +1,137 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 +F + + + + +wv:he@there.com + + +T +T + + +T +T + + +T +MOBILE_PHONE +ABC Company +xyz200 +fin + + +T ++02 + + +T +35 24 15.652W +12 36 22.5N +200 + +
+T +GB +London +
+ +T +At home + + +T +Sonera + + +T + +CALL +OPEN ++35804123123 +I am using this phone during office hours + + +CALL +CLOSED ++35805456456 +I am using this phone outside office hours + + +IM +OPEN +he@there.com +My IM-application is now online + + + +T +AVAILABLE + + +T + +CALL ++35804123123 +OPEN +Home Phone +10 + + +SMS ++35804123123 +OPEN +Home Messaging +20 + + +IM +ari@im.com +CLOSED +Private IM +30 + + + +T +fin + + +T +Busy editing a document + + +T +SLEEPY + + +T +He + + +T +http://www.foo.com/MyLogo + + +T +http://www.foo.com/MyCard + +
+
+
+
+
+
+
diff --git a/test/fixtures/upstream/wv/wv-040.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-040.nostrtbl.wbxml new file mode 100644 index 0000000..e9dde71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-040.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-040.wbxml b/test/fixtures/upstream/wv/wv-040.wbxml new file mode 100644 index 0000000..e9dde71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-040.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-040.wbxml.xml b/test/fixtures/upstream/wv/wv-040.wbxml.xml new file mode 100644 index 0000000..c4235c0 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-040.wbxml.xml @@ -0,0 +1,137 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12346@NOK5110 +F + + + + +wv:he@there.com + + +T +T + + +T +T + + +T +MOBILE_PHONE +ABC Company +xyz200 +fin + + +T ++02 + + +T +35 24 15.652W +12 36 22.5N +200 + +
+T +GB +London +
+ +T +At home + + +T +Sonera + + +T + +CALL +OPEN ++35804123123 +I am using this phone during office hours + + +CALL +CLOSED ++35805456456 +I am using this phone outside office hours + + +IM +OPEN +he@there.com +My IM-application is now online + + + +T +AVAILABLE + + +T + +CALL ++35804123123 +OPEN +Home Phone +10 + + +SMS ++35804123123 +OPEN +Home Messaging +20 + + +IM +ari@im.com +CLOSED +Private IM +30 + + + +T +fin + + +T +Busy editing a document + + +T +SLEEPY + + +T +He + + +T +http://www.foo.com/MyLogo + + +T +http://www.foo.com/MyCard + +
+
+
+
+
+
+
diff --git a/test/fixtures/upstream/wv/wv-040.xml b/test/fixtures/upstream/wv/wv-040.xml new file mode 100644 index 0000000..92200b8 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-040.xml @@ -0,0 +1,142 @@ + + + + + + Inband + im.user.com#48815@server.com + + + + Request + IMApp01#12346@NOK5110 + F + + + + + wv:he@there.com + + + T + T + + + T + T + + + T + MOBILE_PHONE + ABC Company + xyz200 + fin + + + T + +02 + + + T + 35 24 15.652W + 12 36 22.5N + 200 + +
+ T + GB + London +
+ + T + At home + + + T + Sonera + + + T + + CALL + OPEN + +35804123123 + I am using this phone during office hours + + + CALL + CLOSED + +35805456456 + + I am using this phone outside office hours + + + + IM + OPEN + he@there.com + My IM-application is now online + + + + T + AVAILABLE + + + T + + CALL + +35804123123 + OPEN + Home Phone + 10 + + + SMS + +35804123123 + OPEN + Home Messaging + 20 + + + IM + ari@im.com + CLOSED + Private IM + 30 + + + + T + fin + + + T + Busy editing a document + + + + T + SLEEPY + + + T + He + + + T + http://www.foo.com/MyLogo + + + + T + http://www.foo.com/MyCard + + +
+
+
+
+
+
+
diff --git a/test/fixtures/upstream/wv/wv-041.anon.wbxml b/test/fixtures/upstream/wv/wv-041.anon.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-041.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-041.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-041.anon.wbxml.xml new file mode 100644 index 0000000..2e64677 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-041.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-041.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-041.nostrtbl.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-041.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-041.wbxml b/test/fixtures/upstream/wv/wv-041.wbxml new file mode 100644 index 0000000..5c96cf4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-041.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-041.wbxml.xml b/test/fixtures/upstream/wv/wv-041.wbxml.xml new file mode 100644 index 0000000..2e64677 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-041.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-041.xml b/test/fixtures/upstream/wv/wv-041.xml new file mode 100644 index 0000000..4274e4e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-041.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-042.anon.wbxml b/test/fixtures/upstream/wv/wv-042.anon.wbxml new file mode 100644 index 0000000..a53581e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-042.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-042.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-042.anon.wbxml.xml new file mode 100644 index 0000000..8affcba --- /dev/null +++ b/test/fixtures/upstream/wv/wv-042.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12347@NOK5110 + + + +wv:john/ContactList-5@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-042.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-042.nostrtbl.wbxml new file mode 100644 index 0000000..a53581e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-042.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-042.wbxml b/test/fixtures/upstream/wv/wv-042.wbxml new file mode 100644 index 0000000..a53581e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-042.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-042.wbxml.xml b/test/fixtures/upstream/wv/wv-042.wbxml.xml new file mode 100644 index 0000000..8affcba --- /dev/null +++ b/test/fixtures/upstream/wv/wv-042.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12347@NOK5110 + + + +wv:john/ContactList-5@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-042.xml b/test/fixtures/upstream/wv/wv-042.xml new file mode 100644 index 0000000..efe01c7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-042.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12347@NOK5110 + + + + + wv:john/ContactList-5@smith.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-043.anon.wbxml b/test/fixtures/upstream/wv/wv-043.anon.wbxml new file mode 100644 index 0000000..f6afb80 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-043.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-043.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-043.anon.wbxml.xml new file mode 100644 index 0000000..1864bc2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-043.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12347@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-043.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-043.nostrtbl.wbxml new file mode 100644 index 0000000..f6afb80 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-043.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-043.wbxml b/test/fixtures/upstream/wv/wv-043.wbxml new file mode 100644 index 0000000..f6afb80 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-043.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-043.wbxml.xml b/test/fixtures/upstream/wv/wv-043.wbxml.xml new file mode 100644 index 0000000..1864bc2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-043.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12347@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-043.xml b/test/fixtures/upstream/wv/wv-043.xml new file mode 100644 index 0000000..4ddca7a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-043.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12347@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-044.anon.wbxml b/test/fixtures/upstream/wv/wv-044.anon.wbxml new file mode 100644 index 0000000..4af3699 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-044.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-044.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-044.anon.wbxml.xml new file mode 100644 index 0000000..f92815f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-044.anon.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-044.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-044.nostrtbl.wbxml new file mode 100644 index 0000000..4af3699 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-044.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-044.wbxml b/test/fixtures/upstream/wv/wv-044.wbxml new file mode 100644 index 0000000..4af3699 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-044.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-044.wbxml.xml b/test/fixtures/upstream/wv/wv-044.wbxml.xml new file mode 100644 index 0000000..f92815f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-044.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-044.xml b/test/fixtures/upstream/wv/wv-044.xml new file mode 100644 index 0000000..9418bb9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-044.xml @@ -0,0 +1,24 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-045.anon.wbxml b/test/fixtures/upstream/wv/wv-045.anon.wbxml new file mode 100644 index 0000000..b014e87 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-045.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-045.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-045.anon.wbxml.xml new file mode 100644 index 0000000..dcc3993 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-045.anon.wbxml.xml @@ -0,0 +1,27 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +wv:he@there.com + + +wv:she@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-045.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-045.nostrtbl.wbxml new file mode 100644 index 0000000..b014e87 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-045.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-045.wbxml b/test/fixtures/upstream/wv/wv-045.wbxml new file mode 100644 index 0000000..b014e87 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-045.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-045.wbxml.xml b/test/fixtures/upstream/wv/wv-045.wbxml.xml new file mode 100644 index 0000000..dcc3993 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-045.wbxml.xml @@ -0,0 +1,27 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +wv:he@there.com + + +wv:she@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-045.xml b/test/fixtures/upstream/wv/wv-045.xml new file mode 100644 index 0000000..05e5ac0 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-045.xml @@ -0,0 +1,34 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + wv:he@there.com + + + + wv:she@there.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-046.anon.wbxml b/test/fixtures/upstream/wv/wv-046.anon.wbxml new file mode 100644 index 0000000..200d738 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-046.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-046.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-046.anon.wbxml.xml new file mode 100644 index 0000000..f4f7346 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-046.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +wv:he@there.com + + +wv:she@there.com + + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-046.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-046.nostrtbl.wbxml new file mode 100644 index 0000000..200d738 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-046.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-046.wbxml b/test/fixtures/upstream/wv/wv-046.wbxml new file mode 100644 index 0000000..200d738 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-046.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-046.wbxml.xml b/test/fixtures/upstream/wv/wv-046.wbxml.xml new file mode 100644 index 0000000..f4f7346 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-046.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +wv:he@there.com + + +wv:she@there.com + + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-046.xml b/test/fixtures/upstream/wv/wv-046.xml new file mode 100644 index 0000000..88202ed --- /dev/null +++ b/test/fixtures/upstream/wv/wv-046.xml @@ -0,0 +1,68 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + wv:he@there.com + + + + wv:she@there.com + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-047.anon.wbxml b/test/fixtures/upstream/wv/wv-047.anon.wbxml new file mode 100644 index 0000000..531aa40 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-047.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-047.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-047.anon.wbxml.xml new file mode 100644 index 0000000..ba7c15e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-047.anon.wbxml.xml @@ -0,0 +1,263 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + +wv:he@there.com + + +T +T + + +T +T + + +T +MOBILE_PHONE +ABC Company +xyz200 +fin + + +T ++02 + + +T +35 24 15.652W +12 36 22.5N +200 + +
+T +GB +London +
+ +T +At home + + +T +Sonera + + +T + +CALL +OPEN ++35804123123 +I am using this phone during office hours + + +CALL +CLOSED ++35805456456 +I am using this phone outside office hours + + +IM +OPEN +he@there.com +My IM-application is now online + + +IM +OPEN +he@there.com +My IM-application is now online + + + +T +AVAILABLE + + +T + +CALL ++35804123123 +OPEN +Home Phone +10 + + +SMS ++35804123123 +OPEN +Home Messaging +20 + + +IM +ari@im.com +CLOSED +Private IM +30 + + + +T +fin + + +T +Busy editing a document + + +T +SLEEPY + + +T +He + + +T +http://www.foo.com/MyLogo + + +T +http://www.foo.com/MyCard + +
+
+ +wv:she@there.com + + +T +T + + +T +T + + +T +MOBILE_PHONE +ABC Company +xyz200 +fin + + +T ++02 + + +T +35 24 15.652W +12 36 22.5N +200 + +
+T +GB +London +
+ +T +At home + + +T +Sonera + + +T + +CALL +OPEN ++35804123123 +I am using this phone during office hours + + +CALL +CLOSED ++35805456456 +I am using this phone outside office hours + + +IM +OPEN +she@there.com +My IM-application is now online + + + +T +AVAILABLE + + +T + +CALL ++35804123123 +OPEN +Business Phone +10 + + +SMS ++35804123123 +OPEN +Business Messaging +20 + + +IM +ari@im.com +CLOSED +Private IM +30 + + + +T +fin + + +T +Busy editing a document + + +T +SLEEPY + + +T +She + + +T +BASE64EncodedDataHere + + +T +vCardDataHere + +
+
+
+
+
+
+
diff --git a/test/fixtures/upstream/wv/wv-047.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-047.nostrtbl.wbxml new file mode 100644 index 0000000..531aa40 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-047.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-047.wbxml b/test/fixtures/upstream/wv/wv-047.wbxml new file mode 100644 index 0000000..531aa40 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-047.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-047.wbxml.xml b/test/fixtures/upstream/wv/wv-047.wbxml.xml new file mode 100644 index 0000000..ba7c15e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-047.wbxml.xml @@ -0,0 +1,263 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + +wv:he@there.com + + +T +T + + +T +T + + +T +MOBILE_PHONE +ABC Company +xyz200 +fin + + +T ++02 + + +T +35 24 15.652W +12 36 22.5N +200 + +
+T +GB +London +
+ +T +At home + + +T +Sonera + + +T + +CALL +OPEN ++35804123123 +I am using this phone during office hours + + +CALL +CLOSED ++35805456456 +I am using this phone outside office hours + + +IM +OPEN +he@there.com +My IM-application is now online + + +IM +OPEN +he@there.com +My IM-application is now online + + + +T +AVAILABLE + + +T + +CALL ++35804123123 +OPEN +Home Phone +10 + + +SMS ++35804123123 +OPEN +Home Messaging +20 + + +IM +ari@im.com +CLOSED +Private IM +30 + + + +T +fin + + +T +Busy editing a document + + +T +SLEEPY + + +T +He + + +T +http://www.foo.com/MyLogo + + +T +http://www.foo.com/MyCard + +
+
+ +wv:she@there.com + + +T +T + + +T +T + + +T +MOBILE_PHONE +ABC Company +xyz200 +fin + + +T ++02 + + +T +35 24 15.652W +12 36 22.5N +200 + +
+T +GB +London +
+ +T +At home + + +T +Sonera + + +T + +CALL +OPEN ++35804123123 +I am using this phone during office hours + + +CALL +CLOSED ++35805456456 +I am using this phone outside office hours + + +IM +OPEN +she@there.com +My IM-application is now online + + + +T +AVAILABLE + + +T + +CALL ++35804123123 +OPEN +Business Phone +10 + + +SMS ++35804123123 +OPEN +Business Messaging +20 + + +IM +ari@im.com +CLOSED +Private IM +30 + + + +T +fin + + +T +Busy editing a document + + +T +SLEEPY + + +T +She + + +T +BASE64EncodedDataHere + + +T +vCardDataHere + +
+
+
+
+
+
+
diff --git a/test/fixtures/upstream/wv/wv-047.xml b/test/fixtures/upstream/wv/wv-047.xml new file mode 100644 index 0000000..7738c18 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-047.xml @@ -0,0 +1,406 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + wv:he@there.com + + + + T + + T + + + + T + + T + + + + T + + MOBILE_PHONE + + ABC Company + + xyz200 + + fin + + + + T + + +02 + + + + T + + 35 24 15.652W + + 12 36 22.5N + + 200 + + +
+ T + + GB + + London +
+ + + T + + At home + + + + T + + Sonera + + + + T + + + CALL + + OPEN + + +35804123123 + + I am using this phone during office hours + + + + CALL + + CLOSED + + +35805456456 + + I am using this phone outside office hours + + + + IM + + OPEN + + he@there.com + + My IM-application is now online + + + + IM + + OPEN + + he@there.com + + My IM-application is now online + + + + + T + + AVAILABLE + + + + T + + + CALL + + +35804123123 + + OPEN + + Home Phone + + 10 + + + + SMS + + +35804123123 + + OPEN + + Home Messaging + + 20 + + + + IM + + ari@im.com + + CLOSED + + Private IM + + 30 + + + + + T + + fin + + + + T + + Busy editing a document + + + + T + + SLEEPY + + + + T + + He + + + + T + + http://www.foo.com/MyLogo + + + + T + + http://www.foo.com/MyCard + +
+
+ + + wv:she@there.com + + + + T + + T + + + + T + + T + + + + T + + MOBILE_PHONE + + ABC Company + + xyz200 + + fin + + + + T + + +02 + + + + T + + 35 24 15.652W + + 12 36 22.5N + + 200 + + +
+ T + + GB + + London +
+ + + T + + At home + + + + T + + Sonera + + + + T + + + CALL + + OPEN + + +35804123123 + + I am using this phone during office hours + + + + CALL + + CLOSED + + +35805456456 + + I am using this phone outside office hours + + + + IM + + OPEN + + she@there.com + + My IM-application is now online + + + + + T + + AVAILABLE + + + + T + + + CALL + + +35804123123 + + OPEN + + Business Phone + + 10 + + + + SMS + + +35804123123 + + OPEN + + Business Messaging + + 20 + + + + IM + + ari@im.com + + CLOSED + + Private IM + + 30 + + + + + T + + fin + + + + T + + Busy editing a document + + + + T + + SLEEPY + + + + T + + She + + + + T + + BASE64EncodedDataHere + + + + T + + vCardDataHere + +
+
+
+
+
+
+
+ diff --git a/test/fixtures/upstream/wv/wv-048.anon.wbxml b/test/fixtures/upstream/wv/wv-048.anon.wbxml new file mode 100644 index 0000000..435ab00 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-048.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-048.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-048.anon.wbxml.xml new file mode 100644 index 0000000..c61a56c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-048.anon.wbxml.xml @@ -0,0 +1,40 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 +F + + + +wv:matthias@salamander.com + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-048.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-048.nostrtbl.wbxml new file mode 100644 index 0000000..435ab00 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-048.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-048.wbxml b/test/fixtures/upstream/wv/wv-048.wbxml new file mode 100644 index 0000000..435ab00 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-048.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-048.wbxml.xml b/test/fixtures/upstream/wv/wv-048.wbxml.xml new file mode 100644 index 0000000..c61a56c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-048.wbxml.xml @@ -0,0 +1,40 @@ + + + + + +Outband + + + +Request +IMApp01#12345@NOK5110 +F + + + +wv:matthias@salamander.com + + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-048.xml b/test/fixtures/upstream/wv/wv-048.xml new file mode 100644 index 0000000..c06f085 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-048.xml @@ -0,0 +1,62 @@ + + + + + + Outband + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + wv:matthias@salamander.com + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-049.anon.wbxml b/test/fixtures/upstream/wv/wv-049.anon.wbxml new file mode 100644 index 0000000..5c51f45 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-049.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-049.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-049.anon.wbxml.xml new file mode 100644 index 0000000..f10c5b7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-049.anon.wbxml.xml @@ -0,0 +1,23 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-049.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-049.nostrtbl.wbxml new file mode 100644 index 0000000..5c51f45 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-049.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-049.wbxml b/test/fixtures/upstream/wv/wv-049.wbxml new file mode 100644 index 0000000..5c51f45 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-049.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-049.wbxml.xml b/test/fixtures/upstream/wv/wv-049.wbxml.xml new file mode 100644 index 0000000..f10c5b7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-049.wbxml.xml @@ -0,0 +1,23 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-049.xml b/test/fixtures/upstream/wv/wv-049.xml new file mode 100644 index 0000000..f98d1c6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-049.xml @@ -0,0 +1,28 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + + + + + 200 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-050.anon.wbxml b/test/fixtures/upstream/wv/wv-050.anon.wbxml new file mode 100644 index 0000000..952894d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-050.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-050.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-050.anon.wbxml.xml new file mode 100644 index 0000000..2542870 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-050.anon.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + +wv:matthias@salamander.com +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-050.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-050.nostrtbl.wbxml new file mode 100644 index 0000000..952894d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-050.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-050.wbxml b/test/fixtures/upstream/wv/wv-050.wbxml new file mode 100644 index 0000000..952894d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-050.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-050.wbxml.xml b/test/fixtures/upstream/wv/wv-050.wbxml.xml new file mode 100644 index 0000000..2542870 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-050.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + +wv:matthias@salamander.com +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-050.xml b/test/fixtures/upstream/wv/wv-050.xml new file mode 100644 index 0000000..5a2405d --- /dev/null +++ b/test/fixtures/upstream/wv/wv-050.xml @@ -0,0 +1,28 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + + + + wv:matthias@salamander.com + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-051.anon.wbxml b/test/fixtures/upstream/wv/wv-051.anon.wbxml new file mode 100644 index 0000000..67f0023 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-051.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-051.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-051.anon.wbxml.xml new file mode 100644 index 0000000..1d788e9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-051.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 +F + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-051.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-051.nostrtbl.wbxml new file mode 100644 index 0000000..67f0023 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-051.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-051.wbxml b/test/fixtures/upstream/wv/wv-051.wbxml new file mode 100644 index 0000000..67f0023 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-051.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-051.wbxml.xml b/test/fixtures/upstream/wv/wv-051.wbxml.xml new file mode 100644 index 0000000..1d788e9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-051.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 +F + + + + +200 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-051.xml b/test/fixtures/upstream/wv/wv-051.xml new file mode 100644 index 0000000..bf886f8 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-051.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + F + + + + + + 200 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-052.anon.wbxml b/test/fixtures/upstream/wv/wv-052.anon.wbxml new file mode 100644 index 0000000..4d2ed54 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-052.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-052.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-052.anon.wbxml.xml new file mode 100644 index 0000000..76a2b7d --- /dev/null +++ b/test/fixtures/upstream/wv/wv-052.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:matthias@salamander.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-052.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-052.nostrtbl.wbxml new file mode 100644 index 0000000..4d2ed54 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-052.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-052.wbxml b/test/fixtures/upstream/wv/wv-052.wbxml new file mode 100644 index 0000000..4d2ed54 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-052.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-052.wbxml.xml b/test/fixtures/upstream/wv/wv-052.wbxml.xml new file mode 100644 index 0000000..76a2b7d --- /dev/null +++ b/test/fixtures/upstream/wv/wv-052.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:matthias@salamander.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-052.xml b/test/fixtures/upstream/wv/wv-052.xml new file mode 100644 index 0000000..b8024a8 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-052.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:matthias@salamander.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-053.anon.wbxml b/test/fixtures/upstream/wv/wv-053.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-053.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-053.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-053.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-053.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-053.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-053.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-053.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-053.wbxml b/test/fixtures/upstream/wv/wv-053.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-053.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-053.wbxml.xml b/test/fixtures/upstream/wv/wv-053.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-053.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-053.xml b/test/fixtures/upstream/wv/wv-053.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-053.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-054.anon.wbxml b/test/fixtures/upstream/wv/wv-054.anon.wbxml new file mode 100644 index 0000000..035a865 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-054.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-054.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-054.anon.wbxml.xml new file mode 100644 index 0000000..87c81ee --- /dev/null +++ b/test/fixtures/upstream/wv/wv-054.anon.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + +T +on the way home + + +T +HAPPY + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-054.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-054.nostrtbl.wbxml new file mode 100644 index 0000000..035a865 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-054.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-054.wbxml b/test/fixtures/upstream/wv/wv-054.wbxml new file mode 100644 index 0000000..035a865 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-054.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-054.wbxml.xml b/test/fixtures/upstream/wv/wv-054.wbxml.xml new file mode 100644 index 0000000..87c81ee --- /dev/null +++ b/test/fixtures/upstream/wv/wv-054.wbxml.xml @@ -0,0 +1,30 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + +T +on the way home + + +T +HAPPY + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-054.xml b/test/fixtures/upstream/wv/wv-054.xml new file mode 100644 index 0000000..9594201 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-054.xml @@ -0,0 +1,38 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + + T + + on the way home + + + + T + + HAPPY + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-055.anon.wbxml b/test/fixtures/upstream/wv/wv-055.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-055.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-055.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-055.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-055.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-055.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-055.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-055.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-055.wbxml b/test/fixtures/upstream/wv/wv-055.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-055.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-055.wbxml.xml b/test/fixtures/upstream/wv/wv-055.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-055.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-055.xml b/test/fixtures/upstream/wv/wv-055.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-055.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-056.anon.wbxml b/test/fixtures/upstream/wv/wv-056.anon.wbxml new file mode 100644 index 0000000..988c9b7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-056.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-056.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-056.anon.wbxml.xml new file mode 100644 index 0000000..75b3d49 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-056.anon.wbxml.xml @@ -0,0 +1,46 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +T + +text/plain +None +58 + + +wv:he@there.com + + + +Wicked Vicky +wv:john/chatgroup@there.com + + +wv:john/My_friends@smith.com + + + +wv:john@smith.com + + +20010925T1340Z +600 + +Hurry up; they are ringing the bells in the WV already... + + + + + diff --git a/test/fixtures/upstream/wv/wv-056.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-056.nostrtbl.wbxml new file mode 100644 index 0000000..988c9b7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-056.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-056.wbxml b/test/fixtures/upstream/wv/wv-056.wbxml new file mode 100644 index 0000000..988c9b7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-056.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-056.wbxml.xml b/test/fixtures/upstream/wv/wv-056.wbxml.xml new file mode 100644 index 0000000..75b3d49 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-056.wbxml.xml @@ -0,0 +1,46 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +T + +text/plain +None +58 + + +wv:he@there.com + + + +Wicked Vicky +wv:john/chatgroup@there.com + + +wv:john/My_friends@smith.com + + + +wv:john@smith.com + + +20010925T1340Z +600 + +Hurry up; they are ringing the bells in the WV already... + + + + + diff --git a/test/fixtures/upstream/wv/wv-056.xml b/test/fixtures/upstream/wv/wv-056.xml new file mode 100644 index 0000000..0924911 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-056.xml @@ -0,0 +1,62 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + T + + + text/plain + + None + + 58 + + + + wv:he@there.com + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + wv:john/My_friends@smith.com + + + + + wv:john@smith.com + + + + 20010925T1340Z + + 600 + + + Hurry up; they are ringing the bells in the WV already... + + + + + + diff --git a/test/fixtures/upstream/wv/wv-057.anon.wbxml b/test/fixtures/upstream/wv/wv-057.anon.wbxml new file mode 100644 index 0000000..2a10929 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-057.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-057.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-057.anon.wbxml.xml new file mode 100644 index 0000000..b13720e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-057.anon.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-057.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-057.nostrtbl.wbxml new file mode 100644 index 0000000..2a10929 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-057.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-057.wbxml b/test/fixtures/upstream/wv/wv-057.wbxml new file mode 100644 index 0000000..2a10929 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-057.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-057.wbxml.xml b/test/fixtures/upstream/wv/wv-057.wbxml.xml new file mode 100644 index 0000000..b13720e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-057.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-057.xml b/test/fixtures/upstream/wv/wv-057.xml new file mode 100644 index 0000000..c4a8c71 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-057.xml @@ -0,0 +1,34 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + 0x0000f132 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-058.anon.wbxml b/test/fixtures/upstream/wv/wv-058.anon.wbxml new file mode 100644 index 0000000..a3f88df Binary files /dev/null and b/test/fixtures/upstream/wv/wv-058.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-058.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-058.anon.wbxml.xml new file mode 100644 index 0000000..ead1f3f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-058.anon.wbxml.xml @@ -0,0 +1,23 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +P +2048 +wv:/chatgroup@server.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-058.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-058.nostrtbl.wbxml new file mode 100644 index 0000000..a3f88df Binary files /dev/null and b/test/fixtures/upstream/wv/wv-058.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-058.wbxml b/test/fixtures/upstream/wv/wv-058.wbxml new file mode 100644 index 0000000..a3f88df Binary files /dev/null and b/test/fixtures/upstream/wv/wv-058.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-058.wbxml.xml b/test/fixtures/upstream/wv/wv-058.wbxml.xml new file mode 100644 index 0000000..ead1f3f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-058.wbxml.xml @@ -0,0 +1,23 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +P +2048 +wv:/chatgroup@server.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-058.xml b/test/fixtures/upstream/wv/wv-058.xml new file mode 100644 index 0000000..9bea44d --- /dev/null +++ b/test/fixtures/upstream/wv/wv-058.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + P + + 2048 + + wv:/chatgroup@server.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-059.anon.wbxml b/test/fixtures/upstream/wv/wv-059.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-059.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-059.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-059.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-059.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-059.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-059.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-059.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-059.wbxml b/test/fixtures/upstream/wv/wv-059.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-059.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-059.wbxml.xml b/test/fixtures/upstream/wv/wv-059.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-059.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-059.xml b/test/fixtures/upstream/wv/wv-059.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-059.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-060.anon.wbxml b/test/fixtures/upstream/wv/wv-060.anon.wbxml new file mode 100644 index 0000000..ef57df7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-060.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-060.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-060.anon.wbxml.xml new file mode 100644 index 0000000..4fb7076 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-060.anon.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/chatgroup@there.com +5 + + + + + diff --git a/test/fixtures/upstream/wv/wv-060.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-060.nostrtbl.wbxml new file mode 100644 index 0000000..ef57df7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-060.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-060.wbxml b/test/fixtures/upstream/wv/wv-060.wbxml new file mode 100644 index 0000000..ef57df7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-060.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-060.wbxml.xml b/test/fixtures/upstream/wv/wv-060.wbxml.xml new file mode 100644 index 0000000..4fb7076 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-060.wbxml.xml @@ -0,0 +1,22 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/chatgroup@there.com +5 + + + + + diff --git a/test/fixtures/upstream/wv/wv-060.xml b/test/fixtures/upstream/wv/wv-060.xml new file mode 100644 index 0000000..509664c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-060.xml @@ -0,0 +1,28 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/chatgroup@there.com + + 5 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-061.anon.wbxml b/test/fixtures/upstream/wv/wv-061.anon.wbxml new file mode 100644 index 0000000..004ac64 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-061.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-061.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-061.anon.wbxml.xml new file mode 100644 index 0000000..c5d1abf --- /dev/null +++ b/test/fixtures/upstream/wv/wv-061.anon.wbxml.xml @@ -0,0 +1,69 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +41 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + +0x0000f133 +text/plain +None +20 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1342Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-061.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-061.nostrtbl.wbxml new file mode 100644 index 0000000..004ac64 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-061.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-061.wbxml b/test/fixtures/upstream/wv/wv-061.wbxml new file mode 100644 index 0000000..004ac64 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-061.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-061.wbxml.xml b/test/fixtures/upstream/wv/wv-061.wbxml.xml new file mode 100644 index 0000000..c5d1abf --- /dev/null +++ b/test/fixtures/upstream/wv/wv-061.wbxml.xml @@ -0,0 +1,69 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +41 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + +0x0000f133 +text/plain +None +20 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1342Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-061.xml b/test/fixtures/upstream/wv/wv-061.xml new file mode 100644 index 0000000..69b251e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-061.xml @@ -0,0 +1,69 @@ + + + + + + Inband + im.user.com#48815@server.com + + + + Response + IMApp01#12345@NOK5110 + F + + + + + 0x0000f132 + text/plain + None + 41 + + + + Johnnie + wv:john/chatgroup@there.com + + + + + + + Wicked Vicky + wv:john/chatgroup@there.com + + + + 20010925T1340Z + 600 + + + 0x0000f133 + text/plain + None + 20 + + + + Johnnie + wv:john/chatgroup@there.com + + + + + + + Wicked Vicky + wv:john/chatgroup@there.com + + + + 20010925T1342Z + 600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-062.anon.wbxml b/test/fixtures/upstream/wv/wv-062.anon.wbxml new file mode 100644 index 0000000..d5b3682 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-062.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-062.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-062.anon.wbxml.xml new file mode 100644 index 0000000..6ece417 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-062.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-062.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-062.nostrtbl.wbxml new file mode 100644 index 0000000..d5b3682 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-062.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-062.wbxml b/test/fixtures/upstream/wv/wv-062.wbxml new file mode 100644 index 0000000..d5b3682 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-062.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-062.wbxml.xml b/test/fixtures/upstream/wv/wv-062.wbxml.xml new file mode 100644 index 0000000..6ece417 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-062.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-062.xml b/test/fixtures/upstream/wv/wv-062.xml new file mode 100644 index 0000000..8add553 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-062.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + 0x0000f132 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-063.anon.wbxml b/test/fixtures/upstream/wv/wv-063.anon.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-063.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-063.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-063.anon.wbxml.xml new file mode 100644 index 0000000..b4bd707 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-063.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-063.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-063.nostrtbl.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-063.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-063.wbxml b/test/fixtures/upstream/wv/wv-063.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-063.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-063.wbxml.xml b/test/fixtures/upstream/wv/wv-063.wbxml.xml new file mode 100644 index 0000000..b4bd707 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-063.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-063.xml b/test/fixtures/upstream/wv/wv-063.xml new file mode 100644 index 0000000..e88a54e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-063.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-064.anon.wbxml b/test/fixtures/upstream/wv/wv-064.anon.wbxml new file mode 100644 index 0000000..0ed5b0a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-064.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-064.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-064.anon.wbxml.xml new file mode 100644 index 0000000..6929751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-064.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-064.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-064.nostrtbl.wbxml new file mode 100644 index 0000000..0ed5b0a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-064.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-064.wbxml b/test/fixtures/upstream/wv/wv-064.wbxml new file mode 100644 index 0000000..0ed5b0a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-064.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-064.wbxml.xml b/test/fixtures/upstream/wv/wv-064.wbxml.xml new file mode 100644 index 0000000..6929751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-064.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-064.xml b/test/fixtures/upstream/wv/wv-064.xml new file mode 100644 index 0000000..5ca7742 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-064.xml @@ -0,0 +1,60 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + 20010925T1340Z + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-065.anon.wbxml b/test/fixtures/upstream/wv/wv-065.anon.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-065.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-065.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-065.anon.wbxml.xml new file mode 100644 index 0000000..b4bd707 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-065.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-065.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-065.nostrtbl.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-065.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-065.wbxml b/test/fixtures/upstream/wv/wv-065.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-065.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-065.wbxml.xml b/test/fixtures/upstream/wv/wv-065.wbxml.xml new file mode 100644 index 0000000..b4bd707 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-065.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-065.xml b/test/fixtures/upstream/wv/wv-065.xml new file mode 100644 index 0000000..e88a54e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-065.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-066.anon.wbxml b/test/fixtures/upstream/wv/wv-066.anon.wbxml new file mode 100644 index 0000000..710143a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-066.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-066.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-066.anon.wbxml.xml new file mode 100644 index 0000000..8a6507e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-066.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-066.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-066.nostrtbl.wbxml new file mode 100644 index 0000000..710143a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-066.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-066.wbxml b/test/fixtures/upstream/wv/wv-066.wbxml new file mode 100644 index 0000000..710143a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-066.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-066.wbxml.xml b/test/fixtures/upstream/wv/wv-066.wbxml.xml new file mode 100644 index 0000000..8a6507e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-066.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-066.xml b/test/fixtures/upstream/wv/wv-066.xml new file mode 100644 index 0000000..65f67c7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-066.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + 0x0000f132 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-067.anon.wbxml b/test/fixtures/upstream/wv/wv-067.anon.wbxml new file mode 100644 index 0000000..b312726 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-067.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-067.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-067.anon.wbxml.xml new file mode 100644 index 0000000..2e6a428 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-067.anon.wbxml.xml @@ -0,0 +1,46 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +41 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + +Hi guys, just arrived... How is it going? + + + + + diff --git a/test/fixtures/upstream/wv/wv-067.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-067.nostrtbl.wbxml new file mode 100644 index 0000000..b312726 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-067.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-067.wbxml b/test/fixtures/upstream/wv/wv-067.wbxml new file mode 100644 index 0000000..b312726 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-067.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-067.wbxml.xml b/test/fixtures/upstream/wv/wv-067.wbxml.xml new file mode 100644 index 0000000..2e6a428 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-067.wbxml.xml @@ -0,0 +1,46 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +41 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + +Hi guys, just arrived... How is it going? + + + + + diff --git a/test/fixtures/upstream/wv/wv-067.xml b/test/fixtures/upstream/wv/wv-067.xml new file mode 100644 index 0000000..640e389 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-067.xml @@ -0,0 +1,62 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 41 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + 20010925T1340Z + + 600 + + + Hi guys, just arrived... How is it going? + + + + + + diff --git a/test/fixtures/upstream/wv/wv-068.anon.wbxml b/test/fixtures/upstream/wv/wv-068.anon.wbxml new file mode 100644 index 0000000..a7fc071 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-068.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-068.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-068.anon.wbxml.xml new file mode 100644 index 0000000..791c7da --- /dev/null +++ b/test/fixtures/upstream/wv/wv-068.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-068.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-068.nostrtbl.wbxml new file mode 100644 index 0000000..a7fc071 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-068.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-068.wbxml b/test/fixtures/upstream/wv/wv-068.wbxml new file mode 100644 index 0000000..a7fc071 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-068.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-068.wbxml.xml b/test/fixtures/upstream/wv/wv-068.wbxml.xml new file mode 100644 index 0000000..791c7da --- /dev/null +++ b/test/fixtures/upstream/wv/wv-068.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-068.xml b/test/fixtures/upstream/wv/wv-068.xml new file mode 100644 index 0000000..2acf28e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-068.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + + + + 0x0000f132 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-069.anon.wbxml b/test/fixtures/upstream/wv/wv-069.anon.wbxml new file mode 100644 index 0000000..0fbceb4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-069.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-069.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-069.anon.wbxml.xml new file mode 100644 index 0000000..ef22723 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-069.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-069.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-069.nostrtbl.wbxml new file mode 100644 index 0000000..0fbceb4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-069.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-069.wbxml b/test/fixtures/upstream/wv/wv-069.wbxml new file mode 100644 index 0000000..0fbceb4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-069.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-069.wbxml.xml b/test/fixtures/upstream/wv/wv-069.wbxml.xml new file mode 100644 index 0000000..ef22723 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-069.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12346@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-069.xml b/test/fixtures/upstream/wv/wv-069.xml new file mode 100644 index 0000000..2713454 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-069.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12346@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-070.anon.wbxml b/test/fixtures/upstream/wv/wv-070.anon.wbxml new file mode 100644 index 0000000..334725e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-070.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-070.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-070.anon.wbxml.xml new file mode 100644 index 0000000..2369492 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-070.anon.wbxml.xml @@ -0,0 +1,46 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +41 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + +Hi guys, just arrived... How is it going? + + + + + diff --git a/test/fixtures/upstream/wv/wv-070.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-070.nostrtbl.wbxml new file mode 100644 index 0000000..334725e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-070.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-070.wbxml b/test/fixtures/upstream/wv/wv-070.wbxml new file mode 100644 index 0000000..334725e Binary files /dev/null and b/test/fixtures/upstream/wv/wv-070.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-070.wbxml.xml b/test/fixtures/upstream/wv/wv-070.wbxml.xml new file mode 100644 index 0000000..2369492 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-070.wbxml.xml @@ -0,0 +1,46 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +41 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + +Hi guys, just arrived... How is it going? + + + + + diff --git a/test/fixtures/upstream/wv/wv-070.xml b/test/fixtures/upstream/wv/wv-070.xml new file mode 100644 index 0000000..67d2fab --- /dev/null +++ b/test/fixtures/upstream/wv/wv-070.xml @@ -0,0 +1,48 @@ + + + + + + Inband + im.user.com#48815@server.com + + + + Request + IMApp01#12345@NOK5110 + F + + + + + 0x0000f132 + text/plain + None + 41 + + + + Johnnie + wv:john/chatgroup@there.com + + + + + + + Wicked Vicky + wv:john/chatgroup@there.com + + + + 20010925T1340Z + 600 + + + Hi guys, just arrived... How is it going? + + + + + + \ No newline at end of file diff --git a/test/fixtures/upstream/wv/wv-071.anon.wbxml b/test/fixtures/upstream/wv/wv-071.anon.wbxml new file mode 100644 index 0000000..516941f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-071.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-071.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-071.anon.wbxml.xml new file mode 100644 index 0000000..f9a33ae --- /dev/null +++ b/test/fixtures/upstream/wv/wv-071.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-071.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-071.nostrtbl.wbxml new file mode 100644 index 0000000..516941f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-071.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-071.wbxml b/test/fixtures/upstream/wv/wv-071.wbxml new file mode 100644 index 0000000..516941f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-071.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-071.wbxml.xml b/test/fixtures/upstream/wv/wv-071.wbxml.xml new file mode 100644 index 0000000..f9a33ae --- /dev/null +++ b/test/fixtures/upstream/wv/wv-071.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + + + diff --git a/test/fixtures/upstream/wv/wv-071.xml b/test/fixtures/upstream/wv/wv-071.xml new file mode 100644 index 0000000..235c554 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-071.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + + + + 0x0000f132 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-072.anon.wbxml b/test/fixtures/upstream/wv/wv-072.anon.wbxml new file mode 100644 index 0000000..bfd27f7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-072.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-072.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-072.anon.wbxml.xml new file mode 100644 index 0000000..ce5331c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-072.anon.wbxml.xml @@ -0,0 +1,50 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + +20010925T1341Z + +0x0000f132 +text/plain +None +41 + + + +B. Billy +wv:/happy@hippie.com + + + + + + +Johnnie +wv:/happy@hippie.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-072.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-072.nostrtbl.wbxml new file mode 100644 index 0000000..bfd27f7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-072.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-072.wbxml b/test/fixtures/upstream/wv/wv-072.wbxml new file mode 100644 index 0000000..bfd27f7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-072.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-072.wbxml.xml b/test/fixtures/upstream/wv/wv-072.wbxml.xml new file mode 100644 index 0000000..ce5331c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-072.wbxml.xml @@ -0,0 +1,50 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + +20010925T1341Z + +0x0000f132 +text/plain +None +41 + + + +B. Billy +wv:/happy@hippie.com + + + + + + +Johnnie +wv:/happy@hippie.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-072.xml b/test/fixtures/upstream/wv/wv-072.xml new file mode 100644 index 0000000..42bf1de --- /dev/null +++ b/test/fixtures/upstream/wv/wv-072.xml @@ -0,0 +1,68 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + 20010925T1341Z + + + 0x0000f132 + + text/plain + + None + + 41 + + + + + B. Billy + + wv:/happy@hippie.com + + + + + + + + Johnnie + + wv:/happy@hippie.com + + + + + 20010925T1340Z + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-073.anon.wbxml b/test/fixtures/upstream/wv/wv-073.anon.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-073.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-073.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-073.anon.wbxml.xml new file mode 100644 index 0000000..b4bd707 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-073.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-073.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-073.nostrtbl.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-073.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-073.wbxml b/test/fixtures/upstream/wv/wv-073.wbxml new file mode 100644 index 0000000..2d616e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-073.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-073.wbxml.xml b/test/fixtures/upstream/wv/wv-073.wbxml.xml new file mode 100644 index 0000000..b4bd707 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-073.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-073.xml b/test/fixtures/upstream/wv/wv-073.xml new file mode 100644 index 0000000..e88a54e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-073.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-074.anon.wbxml b/test/fixtures/upstream/wv/wv-074.anon.wbxml new file mode 100644 index 0000000..34880c9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-074.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-074.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-074.anon.wbxml.xml new file mode 100644 index 0000000..59fcb52 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-074.anon.wbxml.xml @@ -0,0 +1,29 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + +B. Billy +wv:/happy@hippie.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-074.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-074.nostrtbl.wbxml new file mode 100644 index 0000000..34880c9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-074.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-074.wbxml b/test/fixtures/upstream/wv/wv-074.wbxml new file mode 100644 index 0000000..34880c9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-074.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-074.wbxml.xml b/test/fixtures/upstream/wv/wv-074.wbxml.xml new file mode 100644 index 0000000..59fcb52 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-074.wbxml.xml @@ -0,0 +1,29 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +0x0000f132 + + + +B. Billy +wv:/happy@hippie.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-074.xml b/test/fixtures/upstream/wv/wv-074.xml new file mode 100644 index 0000000..35bfc3c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-074.xml @@ -0,0 +1,36 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + 0x0000f132 + + + + + B. Billy + + wv:/happy@hippie.com + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-075.anon.wbxml b/test/fixtures/upstream/wv/wv-075.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-075.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-075.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-075.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-075.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-075.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-075.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-075.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-075.wbxml b/test/fixtures/upstream/wv/wv-075.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-075.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-075.wbxml.xml b/test/fixtures/upstream/wv/wv-075.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-075.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-075.xml b/test/fixtures/upstream/wv/wv-075.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-075.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-076.anon.wbxml b/test/fixtures/upstream/wv/wv-076.anon.wbxml new file mode 100644 index 0000000..a7a3492 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-076.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-076.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-076.anon.wbxml.xml new file mode 100644 index 0000000..554abec --- /dev/null +++ b/test/fixtures/upstream/wv/wv-076.anon.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-076.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-076.nostrtbl.wbxml new file mode 100644 index 0000000..a7a3492 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-076.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-076.wbxml b/test/fixtures/upstream/wv/wv-076.wbxml new file mode 100644 index 0000000..a7a3492 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-076.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-076.wbxml.xml b/test/fixtures/upstream/wv/wv-076.wbxml.xml new file mode 100644 index 0000000..554abec --- /dev/null +++ b/test/fixtures/upstream/wv/wv-076.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-076.xml b/test/fixtures/upstream/wv/wv-076.xml new file mode 100644 index 0000000..655a15b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-076.xml @@ -0,0 +1,24 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-077.anon.wbxml b/test/fixtures/upstream/wv/wv-077.anon.wbxml new file mode 100644 index 0000000..3d6b8c9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-077.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-077.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-077.anon.wbxml.xml new file mode 100644 index 0000000..5b01932 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-077.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +F + +wv:he@there.com +wv:she@there.com + +Billyboy +wv:john/chatgroup@there.com + +wv:/boringlist@server.com + + + +T + +wv:matthias@salamander.com +wv:francisco@don.com + +WV +wv:john/chatgroup@there.com + +wv:/wireless@village.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-077.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-077.nostrtbl.wbxml new file mode 100644 index 0000000..3d6b8c9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-077.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-077.wbxml b/test/fixtures/upstream/wv/wv-077.wbxml new file mode 100644 index 0000000..3d6b8c9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-077.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-077.wbxml.xml b/test/fixtures/upstream/wv/wv-077.wbxml.xml new file mode 100644 index 0000000..5b01932 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-077.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +F + +wv:he@there.com +wv:she@there.com + +Billyboy +wv:john/chatgroup@there.com + +wv:/boringlist@server.com + + + +T + +wv:matthias@salamander.com +wv:francisco@don.com + +WV +wv:john/chatgroup@there.com + +wv:/wireless@village.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-077.xml b/test/fixtures/upstream/wv/wv-077.xml new file mode 100644 index 0000000..f51d218 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-077.xml @@ -0,0 +1,62 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + F + + + wv:he@there.com + + wv:she@there.com + + + Billyboy + + wv:john/chatgroup@there.com + + + wv:/boringlist@server.com + + + + + T + + + wv:matthias@salamander.com + + wv:francisco@don.com + + + WV + + wv:john/chatgroup@there.com + + + wv:/wireless@village.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-078.anon.wbxml b/test/fixtures/upstream/wv/wv-078.anon.wbxml new file mode 100644 index 0000000..ca7a2b5 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-078.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-078.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-078.anon.wbxml.xml new file mode 100644 index 0000000..13b8045 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-078.anon.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +T + + +wv:matthias@salamander.com + + + + + +wv:matthias@salamander.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-078.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-078.nostrtbl.wbxml new file mode 100644 index 0000000..ca7a2b5 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-078.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-078.wbxml b/test/fixtures/upstream/wv/wv-078.wbxml new file mode 100644 index 0000000..ca7a2b5 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-078.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-078.wbxml.xml b/test/fixtures/upstream/wv/wv-078.wbxml.xml new file mode 100644 index 0000000..13b8045 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-078.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + +T + + +wv:matthias@salamander.com + + + + + +wv:matthias@salamander.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-078.xml b/test/fixtures/upstream/wv/wv-078.xml new file mode 100644 index 0000000..e4a15db --- /dev/null +++ b/test/fixtures/upstream/wv/wv-078.xml @@ -0,0 +1,44 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + T + + + + + wv:matthias@salamander.com + + + + + + + + wv:matthias@salamander.com + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-079.anon.wbxml b/test/fixtures/upstream/wv/wv-079.anon.wbxml new file mode 100644 index 0000000..5ea6fab Binary files /dev/null and b/test/fixtures/upstream/wv/wv-079.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-079.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-079.anon.wbxml.xml new file mode 100644 index 0000000..679f3a9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-079.anon.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-079.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-079.nostrtbl.wbxml new file mode 100644 index 0000000..5ea6fab Binary files /dev/null and b/test/fixtures/upstream/wv/wv-079.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-079.wbxml b/test/fixtures/upstream/wv/wv-079.wbxml new file mode 100644 index 0000000..5ea6fab Binary files /dev/null and b/test/fixtures/upstream/wv/wv-079.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-079.wbxml.xml b/test/fixtures/upstream/wv/wv-079.wbxml.xml new file mode 100644 index 0000000..679f3a9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-079.wbxml.xml @@ -0,0 +1,24 @@ + + + + + +Outband + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-079.xml b/test/fixtures/upstream/wv/wv-079.xml new file mode 100644 index 0000000..383ac2a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-079.xml @@ -0,0 +1,30 @@ + + + + + + Outband + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-080.anon.wbxml b/test/fixtures/upstream/wv/wv-080.anon.wbxml new file mode 100644 index 0000000..df41521 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-080.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-080.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-080.anon.wbxml.xml new file mode 100644 index 0000000..3a57593 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-080.anon.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-080.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-080.nostrtbl.wbxml new file mode 100644 index 0000000..df41521 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-080.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-080.wbxml b/test/fixtures/upstream/wv/wv-080.wbxml new file mode 100644 index 0000000..df41521 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-080.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-080.wbxml.xml b/test/fixtures/upstream/wv/wv-080.wbxml.xml new file mode 100644 index 0000000..3a57593 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-080.wbxml.xml @@ -0,0 +1,19 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-080.xml b/test/fixtures/upstream/wv/wv-080.xml new file mode 100644 index 0000000..d550d61 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-080.xml @@ -0,0 +1,24 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-081.anon.wbxml b/test/fixtures/upstream/wv/wv-081.anon.wbxml new file mode 100644 index 0000000..f3339d7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-081.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-081.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-081.anon.wbxml.xml new file mode 100644 index 0000000..474ede4 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-081.anon.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + +wv:john/My_friends@smith.com +wv:john/My_family@smith.com +wv:john/My_colleagues@smith.com +wv:john/The_WV@smith.com +wv:john/My_enemies@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-081.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-081.nostrtbl.wbxml new file mode 100644 index 0000000..f3339d7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-081.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-081.wbxml b/test/fixtures/upstream/wv/wv-081.wbxml new file mode 100644 index 0000000..f3339d7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-081.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-081.wbxml.xml b/test/fixtures/upstream/wv/wv-081.wbxml.xml new file mode 100644 index 0000000..474ede4 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-081.wbxml.xml @@ -0,0 +1,26 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + +wv:john/My_friends@smith.com +wv:john/My_family@smith.com +wv:john/My_colleagues@smith.com +wv:john/The_WV@smith.com +wv:john/My_enemies@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-081.xml b/test/fixtures/upstream/wv/wv-081.xml new file mode 100644 index 0000000..0588423 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-081.xml @@ -0,0 +1,36 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + wv:john/My_friends@smith.com + + wv:john/My_family@smith.com + + wv:john/My_colleagues@smith.com + + wv:john/The_WV@smith.com + + wv:john/My_enemies@smith.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-082.anon.wbxml b/test/fixtures/upstream/wv/wv-082.anon.wbxml new file mode 100644 index 0000000..06afbd6 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-082.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-082.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-082.anon.wbxml.xml new file mode 100644 index 0000000..8e2dbad --- /dev/null +++ b/test/fixtures/upstream/wv/wv-082.anon.wbxml.xml @@ -0,0 +1,41 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + +Brainstorm +wv:bright@dark.com + + +Randall the Vandal +wv:randall@fairlane.com + + + + +DisplayName +My friends + + +Default +F + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-082.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-082.nostrtbl.wbxml new file mode 100644 index 0000000..06afbd6 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-082.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-082.wbxml b/test/fixtures/upstream/wv/wv-082.wbxml new file mode 100644 index 0000000..06afbd6 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-082.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-082.wbxml.xml b/test/fixtures/upstream/wv/wv-082.wbxml.xml new file mode 100644 index 0000000..8e2dbad --- /dev/null +++ b/test/fixtures/upstream/wv/wv-082.wbxml.xml @@ -0,0 +1,41 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + +Brainstorm +wv:bright@dark.com + + +Randall the Vandal +wv:randall@fairlane.com + + + + +DisplayName +My friends + + +Default +F + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-082.xml b/test/fixtures/upstream/wv/wv-082.xml new file mode 100644 index 0000000..36ad58a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-082.xml @@ -0,0 +1,54 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/My_friends@smith.com + + + + Brainstorm + + wv:bright@dark.com + + + + Randall the Vandal + + wv:randall@fairlane.com + + + + + + DisplayName + + My friends + + + + Default + + F + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-083.anon.wbxml b/test/fixtures/upstream/wv/wv-083.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-083.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-083.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-083.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-083.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-083.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-083.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-083.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-083.wbxml b/test/fixtures/upstream/wv/wv-083.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-083.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-083.wbxml.xml b/test/fixtures/upstream/wv/wv-083.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-083.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-083.xml b/test/fixtures/upstream/wv/wv-083.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-083.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-084.anon.wbxml b/test/fixtures/upstream/wv/wv-084.anon.wbxml new file mode 100644 index 0000000..4d5549a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-084.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-084.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-084.anon.wbxml.xml new file mode 100644 index 0000000..b23d520 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-084.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_enemies@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-084.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-084.nostrtbl.wbxml new file mode 100644 index 0000000..4d5549a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-084.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-084.wbxml b/test/fixtures/upstream/wv/wv-084.wbxml new file mode 100644 index 0000000..4d5549a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-084.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-084.wbxml.xml b/test/fixtures/upstream/wv/wv-084.wbxml.xml new file mode 100644 index 0000000..b23d520 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-084.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_enemies@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-084.xml b/test/fixtures/upstream/wv/wv-084.xml new file mode 100644 index 0000000..daaff56 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-084.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/My_enemies@smith.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-085.anon.wbxml b/test/fixtures/upstream/wv/wv-085.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-085.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-085.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-085.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-085.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-085.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-085.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-085.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-085.wbxml b/test/fixtures/upstream/wv/wv-085.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-085.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-085.wbxml.xml b/test/fixtures/upstream/wv/wv-085.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-085.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-085.xml b/test/fixtures/upstream/wv/wv-085.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-085.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-086.anon.wbxml b/test/fixtures/upstream/wv/wv-086.anon.wbxml new file mode 100644 index 0000000..9a248b0 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-086.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-086.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-086.anon.wbxml.xml new file mode 100644 index 0000000..6d88474 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-086.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-086.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-086.nostrtbl.wbxml new file mode 100644 index 0000000..9a248b0 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-086.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-086.wbxml b/test/fixtures/upstream/wv/wv-086.wbxml new file mode 100644 index 0000000..9a248b0 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-086.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-086.wbxml.xml b/test/fixtures/upstream/wv/wv-086.wbxml.xml new file mode 100644 index 0000000..6d88474 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-086.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-086.xml b/test/fixtures/upstream/wv/wv-086.xml new file mode 100644 index 0000000..9a3395e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-086.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/My_friends@smith.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-087.anon.wbxml b/test/fixtures/upstream/wv/wv-087.anon.wbxml new file mode 100644 index 0000000..a307566 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-087.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-087.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-087.anon.wbxml.xml new file mode 100644 index 0000000..510e8e6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-087.anon.wbxml.xml @@ -0,0 +1,52 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + +Brainstrom +wv:bright@dark.com + + +Randall the Vandal +wv:randall@fairlane.com + + +JLo +wv:jenny@logic.com + + +Ex +wv:ex@wife.com + + + + +DisplayName +My friends + + +Default +F + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-087.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-087.nostrtbl.wbxml new file mode 100644 index 0000000..a307566 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-087.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-087.wbxml b/test/fixtures/upstream/wv/wv-087.wbxml new file mode 100644 index 0000000..a307566 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-087.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-087.wbxml.xml b/test/fixtures/upstream/wv/wv-087.wbxml.xml new file mode 100644 index 0000000..510e8e6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-087.wbxml.xml @@ -0,0 +1,52 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + +Brainstrom +wv:bright@dark.com + + +Randall the Vandal +wv:randall@fairlane.com + + +JLo +wv:jenny@logic.com + + +Ex +wv:ex@wife.com + + + + +DisplayName +My friends + + +Default +F + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-087.xml b/test/fixtures/upstream/wv/wv-087.xml new file mode 100644 index 0000000..f43a928 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-087.xml @@ -0,0 +1,70 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + + + + Brainstrom + + wv:bright@dark.com + + + + Randall the Vandal + + wv:randall@fairlane.com + + + + JLo + + wv:jenny@logic.com + + + + Ex + + wv:ex@wife.com + + + + + + DisplayName + + My friends + + + + Default + + F + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-088.anon.wbxml b/test/fixtures/upstream/wv/wv-088.anon.wbxml new file mode 100644 index 0000000..8ee0221 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-088.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-088.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-088.anon.wbxml.xml new file mode 100644 index 0000000..671d80f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-088.anon.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + +Randall the Vandal +wv:randall@fairlane.com + + +JLo +wv:jenny@logic.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-088.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-088.nostrtbl.wbxml new file mode 100644 index 0000000..8ee0221 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-088.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-088.wbxml b/test/fixtures/upstream/wv/wv-088.wbxml new file mode 100644 index 0000000..8ee0221 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-088.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-088.wbxml.xml b/test/fixtures/upstream/wv/wv-088.wbxml.xml new file mode 100644 index 0000000..671d80f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-088.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + +Randall the Vandal +wv:randall@fairlane.com + + +JLo +wv:jenny@logic.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-088.xml b/test/fixtures/upstream/wv/wv-088.xml new file mode 100644 index 0000000..3885751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-088.xml @@ -0,0 +1,40 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/My_friends@smith.com + + + + Randall the Vandal + + wv:randall@fairlane.com + + + + JLo + + wv:jenny@logic.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-089.anon.wbxml b/test/fixtures/upstream/wv/wv-089.anon.wbxml new file mode 100644 index 0000000..5f6c233 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-089.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-089.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-089.anon.wbxml.xml new file mode 100644 index 0000000..7e02640 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-089.anon.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + +Randall the Vandal +wv:randall@fairlane.com + + +JLo +wv:jenny@logic.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-089.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-089.nostrtbl.wbxml new file mode 100644 index 0000000..5f6c233 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-089.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-089.wbxml b/test/fixtures/upstream/wv/wv-089.wbxml new file mode 100644 index 0000000..5f6c233 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-089.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-089.wbxml.xml b/test/fixtures/upstream/wv/wv-089.wbxml.xml new file mode 100644 index 0000000..7e02640 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-089.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + +Randall the Vandal +wv:randall@fairlane.com + + +JLo +wv:jenny@logic.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-089.xml b/test/fixtures/upstream/wv/wv-089.xml new file mode 100644 index 0000000..4cbed26 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-089.xml @@ -0,0 +1,44 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + + + + Randall the Vandal + + wv:randall@fairlane.com + + + + JLo + + wv:jenny@logic.com + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-090.anon.wbxml b/test/fixtures/upstream/wv/wv-090.anon.wbxml new file mode 100644 index 0000000..811ce0f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-090.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-090.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-090.anon.wbxml.xml new file mode 100644 index 0000000..9abeefe --- /dev/null +++ b/test/fixtures/upstream/wv/wv-090.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + +wv:randall@fairlane.com +wv:jenny@logic.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-090.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-090.nostrtbl.wbxml new file mode 100644 index 0000000..811ce0f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-090.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-090.wbxml b/test/fixtures/upstream/wv/wv-090.wbxml new file mode 100644 index 0000000..811ce0f Binary files /dev/null and b/test/fixtures/upstream/wv/wv-090.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-090.wbxml.xml b/test/fixtures/upstream/wv/wv-090.wbxml.xml new file mode 100644 index 0000000..9abeefe --- /dev/null +++ b/test/fixtures/upstream/wv/wv-090.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + +wv:randall@fairlane.com +wv:jenny@logic.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-090.xml b/test/fixtures/upstream/wv/wv-090.xml new file mode 100644 index 0000000..524836b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-090.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/My_friends@smith.com + + + wv:randall@fairlane.com + + wv:jenny@logic.com + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-091.anon.wbxml b/test/fixtures/upstream/wv/wv-091.anon.wbxml new file mode 100644 index 0000000..90435c4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-091.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-091.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-091.anon.wbxml.xml new file mode 100644 index 0000000..3bea610 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-091.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-091.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-091.nostrtbl.wbxml new file mode 100644 index 0000000..90435c4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-091.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-091.wbxml b/test/fixtures/upstream/wv/wv-091.wbxml new file mode 100644 index 0000000..90435c4 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-091.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-091.wbxml.xml b/test/fixtures/upstream/wv/wv-091.wbxml.xml new file mode 100644 index 0000000..3bea610 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-091.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-091.xml b/test/fixtures/upstream/wv/wv-091.xml new file mode 100644 index 0000000..83be632 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-091.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-092.anon.wbxml b/test/fixtures/upstream/wv/wv-092.anon.wbxml new file mode 100644 index 0000000..fa933d7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-092.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-092.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-092.anon.wbxml.xml new file mode 100644 index 0000000..23b3564 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-092.anon.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + +DisplayName +My enemies + + +Default +T + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-092.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-092.nostrtbl.wbxml new file mode 100644 index 0000000..fa933d7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-092.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-092.wbxml b/test/fixtures/upstream/wv/wv-092.wbxml new file mode 100644 index 0000000..fa933d7 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-092.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-092.wbxml.xml b/test/fixtures/upstream/wv/wv-092.wbxml.xml new file mode 100644 index 0000000..23b3564 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-092.wbxml.xml @@ -0,0 +1,31 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/My_friends@smith.com + + +DisplayName +My enemies + + +Default +T + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-092.xml b/test/fixtures/upstream/wv/wv-092.xml new file mode 100644 index 0000000..e6ec6d6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-092.xml @@ -0,0 +1,40 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/My_friends@smith.com + + + + DisplayName + + My enemies + + + + Default + + T + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-093.anon.wbxml b/test/fixtures/upstream/wv/wv-093.anon.wbxml new file mode 100644 index 0000000..c08f9dd Binary files /dev/null and b/test/fixtures/upstream/wv/wv-093.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-093.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-093.anon.wbxml.xml new file mode 100644 index 0000000..0db9002 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-093.anon.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + +DisplayName +My enemies + + +Default +T + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-093.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-093.nostrtbl.wbxml new file mode 100644 index 0000000..c08f9dd Binary files /dev/null and b/test/fixtures/upstream/wv/wv-093.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-093.wbxml b/test/fixtures/upstream/wv/wv-093.wbxml new file mode 100644 index 0000000..c08f9dd Binary files /dev/null and b/test/fixtures/upstream/wv/wv-093.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-093.wbxml.xml b/test/fixtures/upstream/wv/wv-093.wbxml.xml new file mode 100644 index 0000000..0db9002 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-093.wbxml.xml @@ -0,0 +1,34 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 + + + +DisplayName +My enemies + + +Default +T + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-093.xml b/test/fixtures/upstream/wv/wv-093.xml new file mode 100644 index 0000000..f05acd7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-093.xml @@ -0,0 +1,44 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + + + + DisplayName + + My enemies + + + + Default + + T + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-094.anon.wbxml b/test/fixtures/upstream/wv/wv-094.anon.wbxml new file mode 100644 index 0000000..394ebb6 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-094.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-094.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-094.anon.wbxml.xml new file mode 100644 index 0000000..c96261c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-094.anon.wbxml.xml @@ -0,0 +1,29 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + +somebody@nowhere.com +another_one@nowhere.com +wv:john/My_friends@smith.com +wv:john/My_family@smith.com +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-094.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-094.nostrtbl.wbxml new file mode 100644 index 0000000..394ebb6 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-094.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-094.wbxml b/test/fixtures/upstream/wv/wv-094.wbxml new file mode 100644 index 0000000..394ebb6 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-094.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-094.wbxml.xml b/test/fixtures/upstream/wv/wv-094.wbxml.xml new file mode 100644 index 0000000..c96261c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-094.wbxml.xml @@ -0,0 +1,29 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + + + + + +somebody@nowhere.com +another_one@nowhere.com +wv:john/My_friends@smith.com +wv:john/My_family@smith.com +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-094.xml b/test/fixtures/upstream/wv/wv-094.xml new file mode 100644 index 0000000..9e003f6 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-094.xml @@ -0,0 +1,40 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + + + + + + + somebody@nowhere.com + + another_one@nowhere.com + + wv:john/My_friends@smith.com + + wv:john/My_family@smith.com + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-095.anon.wbxml b/test/fixtures/upstream/wv/wv-095.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-095.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-095.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-095.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-095.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-095.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-095.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-095.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-095.wbxml b/test/fixtures/upstream/wv/wv-095.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-095.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-095.wbxml.xml b/test/fixtures/upstream/wv/wv-095.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-095.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-095.xml b/test/fixtures/upstream/wv/wv-095.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-095.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-096.anon.wbxml b/test/fixtures/upstream/wv/wv-096.anon.wbxml new file mode 100644 index 0000000..32bfc84 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-096.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-096.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-096.anon.wbxml.xml new file mode 100644 index 0000000..28ee586 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-096.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +somebody@nowhere.com +another_one@nowhere.com +wv:john/My_friends@smith.com +wv:john/My_family@smith.com +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-096.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-096.nostrtbl.wbxml new file mode 100644 index 0000000..32bfc84 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-096.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-096.wbxml b/test/fixtures/upstream/wv/wv-096.wbxml new file mode 100644 index 0000000..32bfc84 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-096.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-096.wbxml.xml b/test/fixtures/upstream/wv/wv-096.wbxml.xml new file mode 100644 index 0000000..28ee586 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-096.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +somebody@nowhere.com +another_one@nowhere.com +wv:john/My_friends@smith.com +wv:john/My_family@smith.com +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-096.xml b/test/fixtures/upstream/wv/wv-096.xml new file mode 100644 index 0000000..7425e3f --- /dev/null +++ b/test/fixtures/upstream/wv/wv-096.xml @@ -0,0 +1,34 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + somebody@nowhere.com + + another_one@nowhere.com + + wv:john/My_friends@smith.com + + wv:john/My_family@smith.com + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-097.anon.wbxml b/test/fixtures/upstream/wv/wv-097.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-097.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-097.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-097.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-097.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-097.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-097.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-097.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-097.wbxml b/test/fixtures/upstream/wv/wv-097.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-097.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-097.wbxml.xml b/test/fixtures/upstream/wv/wv-097.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-097.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-097.xml b/test/fixtures/upstream/wv/wv-097.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-097.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-098.anon.wbxml b/test/fixtures/upstream/wv/wv-098.anon.wbxml new file mode 100644 index 0000000..754ea12 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-098.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-098.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-098.anon.wbxml.xml new file mode 100644 index 0000000..6e60cba --- /dev/null +++ b/test/fixtures/upstream/wv/wv-098.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-098.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-098.nostrtbl.wbxml new file mode 100644 index 0000000..754ea12 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-098.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-098.wbxml b/test/fixtures/upstream/wv/wv-098.wbxml new file mode 100644 index 0000000..754ea12 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-098.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-098.wbxml.xml b/test/fixtures/upstream/wv/wv-098.wbxml.xml new file mode 100644 index 0000000..6e60cba --- /dev/null +++ b/test/fixtures/upstream/wv/wv-098.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-098.xml b/test/fixtures/upstream/wv/wv-098.xml new file mode 100644 index 0000000..5e0914a --- /dev/null +++ b/test/fixtures/upstream/wv/wv-098.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-099.anon.wbxml b/test/fixtures/upstream/wv/wv-099.anon.wbxml new file mode 100644 index 0000000..ccd4da9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-099.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-099.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-099.anon.wbxml.xml new file mode 100644 index 0000000..34e0aed --- /dev/null +++ b/test/fixtures/upstream/wv/wv-099.anon.wbxml.xml @@ -0,0 +1,60 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +200 + + + + + + + + +somebody@nowhere.com + + + + + + + + +another_one@nowhere.com + + + + + + +wv:john/My_friends@smith.com + + + + + + +wv:john/My_family@smith.com + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-099.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-099.nostrtbl.wbxml new file mode 100644 index 0000000..ccd4da9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-099.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-099.wbxml b/test/fixtures/upstream/wv/wv-099.wbxml new file mode 100644 index 0000000..ccd4da9 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-099.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-099.wbxml.xml b/test/fixtures/upstream/wv/wv-099.wbxml.xml new file mode 100644 index 0000000..34e0aed --- /dev/null +++ b/test/fixtures/upstream/wv/wv-099.wbxml.xml @@ -0,0 +1,60 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +200 + + + + + + + + +somebody@nowhere.com + + + + + + + + +another_one@nowhere.com + + + + + + +wv:john/My_friends@smith.com + + + + + + +wv:john/My_family@smith.com + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-099.xml b/test/fixtures/upstream/wv/wv-099.xml new file mode 100644 index 0000000..76d8e0e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-099.xml @@ -0,0 +1,82 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + + + + + + + + + + + somebody@nowhere.com + + + + + + + + + + + + + + another_one@nowhere.com + + + + + + + + + + wv:john/My_friends@smith.com + + + + + + + + + + wv:john/My_family@smith.com + + + + + + + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-100.anon.wbxml b/test/fixtures/upstream/wv/wv-100.anon.wbxml new file mode 100644 index 0000000..26a7bac Binary files /dev/null and b/test/fixtures/upstream/wv/wv-100.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-100.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-100.anon.wbxml.xml new file mode 100644 index 0000000..63223fe --- /dev/null +++ b/test/fixtures/upstream/wv/wv-100.anon.wbxml.xml @@ -0,0 +1,57 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/partygroup@there.com + + +Name +Party discussion + + +Accesstype +Restricted + + +PrivateMessaging +F + + +Searchable +T + + +Topic +Party + + +MaxActiveUsers +30 + + +text/plain +Welcome to WV's party house + + +T + +Jonhhie +wv:thisgroup/group@server.com + +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-100.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-100.nostrtbl.wbxml new file mode 100644 index 0000000..26a7bac Binary files /dev/null and b/test/fixtures/upstream/wv/wv-100.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-100.wbxml b/test/fixtures/upstream/wv/wv-100.wbxml new file mode 100644 index 0000000..26a7bac Binary files /dev/null and b/test/fixtures/upstream/wv/wv-100.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-100.wbxml.xml b/test/fixtures/upstream/wv/wv-100.wbxml.xml new file mode 100644 index 0000000..63223fe --- /dev/null +++ b/test/fixtures/upstream/wv/wv-100.wbxml.xml @@ -0,0 +1,57 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/partygroup@there.com + + +Name +Party discussion + + +Accesstype +Restricted + + +PrivateMessaging +F + + +Searchable +T + + +Topic +Party + + +MaxActiveUsers +30 + + +text/plain +Welcome to WV's party house + + +T + +Jonhhie +wv:thisgroup/group@server.com + +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-100.xml b/test/fixtures/upstream/wv/wv-100.xml new file mode 100644 index 0000000..e339af3 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-100.xml @@ -0,0 +1,80 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/partygroup@there.com + + + + Name + + Party discussion + + + + Accesstype + + Restricted + + + + PrivateMessaging + + F + + + + Searchable + + T + + + + Topic + + Party + + + + MaxActiveUsers + + 30 + + + + text/plain + + Welcome to WV's party house + + + + T + + + Jonhhie + + wv:thisgroup/group@server.com + + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-101.anon.wbxml b/test/fixtures/upstream/wv/wv-101.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-101.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-101.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-101.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-101.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-101.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-101.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-101.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-101.wbxml b/test/fixtures/upstream/wv/wv-101.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-101.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-101.wbxml.xml b/test/fixtures/upstream/wv/wv-101.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-101.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-101.xml b/test/fixtures/upstream/wv/wv-101.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-101.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-102.anon.wbxml b/test/fixtures/upstream/wv/wv-102.anon.wbxml new file mode 100644 index 0000000..32ea4e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-102.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-102.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-102.anon.wbxml.xml new file mode 100644 index 0000000..a8191f2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-102.anon.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/partygroup@there.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-102.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-102.nostrtbl.wbxml new file mode 100644 index 0000000..32ea4e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-102.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-102.wbxml b/test/fixtures/upstream/wv/wv-102.wbxml new file mode 100644 index 0000000..32ea4e1 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-102.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-102.wbxml.xml b/test/fixtures/upstream/wv/wv-102.wbxml.xml new file mode 100644 index 0000000..a8191f2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-102.wbxml.xml @@ -0,0 +1,21 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/partygroup@there.com + + + + + diff --git a/test/fixtures/upstream/wv/wv-102.xml b/test/fixtures/upstream/wv/wv-102.xml new file mode 100644 index 0000000..ad4926c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-102.xml @@ -0,0 +1,26 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/partygroup@there.com + + + + + + diff --git a/test/fixtures/upstream/wv/wv-103.anon.wbxml b/test/fixtures/upstream/wv/wv-103.anon.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-103.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-103.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-103.anon.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-103.anon.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-103.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-103.nostrtbl.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-103.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-103.wbxml b/test/fixtures/upstream/wv/wv-103.wbxml new file mode 100644 index 0000000..2178b71 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-103.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-103.wbxml.xml b/test/fixtures/upstream/wv/wv-103.wbxml.xml new file mode 100644 index 0000000..546fc28 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-103.wbxml.xml @@ -0,0 +1,25 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + +200 +Successfully completed. + + + + + + diff --git a/test/fixtures/upstream/wv/wv-103.xml b/test/fixtures/upstream/wv/wv-103.xml new file mode 100644 index 0000000..7b87990 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-103.xml @@ -0,0 +1,32 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + 200 + + Successfully completed. + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-104.anon.wbxml b/test/fixtures/upstream/wv/wv-104.anon.wbxml new file mode 100644 index 0000000..91ee091 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-104.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-104.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-104.anon.wbxml.xml new file mode 100644 index 0000000..e300c94 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-104.anon.wbxml.xml @@ -0,0 +1,23 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/partygroup@there.com +T +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-104.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-104.nostrtbl.wbxml new file mode 100644 index 0000000..91ee091 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-104.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-104.wbxml b/test/fixtures/upstream/wv/wv-104.wbxml new file mode 100644 index 0000000..91ee091 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-104.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-104.wbxml.xml b/test/fixtures/upstream/wv/wv-104.wbxml.xml new file mode 100644 index 0000000..e300c94 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-104.wbxml.xml @@ -0,0 +1,23 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 + + + +wv:john/partygroup@there.com +T +T + + + + + diff --git a/test/fixtures/upstream/wv/wv-104.xml b/test/fixtures/upstream/wv/wv-104.xml new file mode 100644 index 0000000..fd6fe21 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-104.xml @@ -0,0 +1,30 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + + + + wv:john/partygroup@there.com + + T + + T + + + + + + diff --git a/test/fixtures/upstream/wv/wv-105.anon.wbxml b/test/fixtures/upstream/wv/wv-105.anon.wbxml new file mode 100644 index 0000000..9d09d6b Binary files /dev/null and b/test/fixtures/upstream/wv/wv-105.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-105.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-105.anon.wbxml.xml new file mode 100644 index 0000000..c3da2f9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-105.anon.wbxml.xml @@ -0,0 +1,47 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + + +Johnny +wv:john/partygroup@there.com + + +He +wv:john/partygroup@there.com + + +She +wv:john/partygroup@there.com + + +Francisco +wv:john/partygroup@there.com + + +Matthias +wv:john/partygroup@there.com + + + +text/plain +Welcome to WVs party house + + + + + + diff --git a/test/fixtures/upstream/wv/wv-105.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-105.nostrtbl.wbxml new file mode 100644 index 0000000..9d09d6b Binary files /dev/null and b/test/fixtures/upstream/wv/wv-105.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-105.wbxml b/test/fixtures/upstream/wv/wv-105.wbxml new file mode 100644 index 0000000..9d09d6b Binary files /dev/null and b/test/fixtures/upstream/wv/wv-105.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-105.wbxml.xml b/test/fixtures/upstream/wv/wv-105.wbxml.xml new file mode 100644 index 0000000..c3da2f9 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-105.wbxml.xml @@ -0,0 +1,47 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Response +IMApp01#12345@NOK5110 +F + + + + + +Johnny +wv:john/partygroup@there.com + + +He +wv:john/partygroup@there.com + + +She +wv:john/partygroup@there.com + + +Francisco +wv:john/partygroup@there.com + + +Matthias +wv:john/partygroup@there.com + + + +text/plain +Welcome to WVs party house + + + + + + diff --git a/test/fixtures/upstream/wv/wv-105.xml b/test/fixtures/upstream/wv/wv-105.xml new file mode 100644 index 0000000..4c47ea1 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-105.xml @@ -0,0 +1,64 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Response + + IMApp01#12345@NOK5110 + + F + + + + + + + Johnny + + wv:john/partygroup@there.com + + + + He + + wv:john/partygroup@there.com + + + + She + + wv:john/partygroup@there.com + + + + Francisco + + wv:john/partygroup@there.com + + + + Matthias + + wv:john/partygroup@there.com + + + + + text/plain + + Welcome to WVs party house + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-106-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-106-datetime.anon.wbxml new file mode 100644 index 0000000..955cec5 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-106-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-106-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-106-datetime.anon.wbxml.xml new file mode 100644 index 0000000..6929751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-106-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-106-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-106-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..955cec5 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-106-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-106-datetime.wbxml b/test/fixtures/upstream/wv/wv-106-datetime.wbxml new file mode 100644 index 0000000..955cec5 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-106-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-106-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-106-datetime.wbxml.xml new file mode 100644 index 0000000..6929751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-106-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-106-datetime.xml b/test/fixtures/upstream/wv/wv-106-datetime.xml new file mode 100644 index 0000000..72ec7f4 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-106-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + + 20010925T1340 + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-107-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-107-datetime.anon.wbxml new file mode 100644 index 0000000..f2b3a9a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-107-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-107-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-107-datetime.anon.wbxml.xml new file mode 100644 index 0000000..e31ad4b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-107-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T134013Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-107-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-107-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..f2b3a9a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-107-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-107-datetime.wbxml b/test/fixtures/upstream/wv/wv-107-datetime.wbxml new file mode 100644 index 0000000..f2b3a9a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-107-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-107-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-107-datetime.wbxml.xml new file mode 100644 index 0000000..e31ad4b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-107-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T134013Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-107-datetime.xml b/test/fixtures/upstream/wv/wv-107-datetime.xml new file mode 100644 index 0000000..7ab5189 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-107-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + + 20010925T134013 + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-108-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-108-datetime.anon.wbxml new file mode 100644 index 0000000..0ed5b0a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-108-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-108-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-108-datetime.anon.wbxml.xml new file mode 100644 index 0000000..6929751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-108-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-108-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-108-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..0ed5b0a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-108-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-108-datetime.wbxml b/test/fixtures/upstream/wv/wv-108-datetime.wbxml new file mode 100644 index 0000000..0ed5b0a Binary files /dev/null and b/test/fixtures/upstream/wv/wv-108-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-108-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-108-datetime.wbxml.xml new file mode 100644 index 0000000..6929751 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-108-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T1340Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-108-datetime.xml b/test/fixtures/upstream/wv/wv-108-datetime.xml new file mode 100644 index 0000000..70e129e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-108-datetime.xml @@ -0,0 +1,65 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 20010925T1340Z + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-109-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-109-datetime.anon.wbxml new file mode 100644 index 0000000..d2da1e2 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-109-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-109-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-109-datetime.anon.wbxml.xml new file mode 100644 index 0000000..e31ad4b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-109-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T134013Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-109-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-109-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..d2da1e2 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-109-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-109-datetime.wbxml b/test/fixtures/upstream/wv/wv-109-datetime.wbxml new file mode 100644 index 0000000..d2da1e2 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-109-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-109-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-109-datetime.wbxml.xml new file mode 100644 index 0000000..e31ad4b --- /dev/null +++ b/test/fixtures/upstream/wv/wv-109-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +20010925T134013Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-109-datetime.xml b/test/fixtures/upstream/wv/wv-109-datetime.xml new file mode 100644 index 0000000..95b3e75 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-109-datetime.xml @@ -0,0 +1,65 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 20010925T134013Z + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-110-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-110-datetime.anon.wbxml new file mode 100644 index 0000000..a3a945d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-110-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-110-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-110-datetime.anon.wbxml.xml new file mode 100644 index 0000000..abfd354 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-110-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-110-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-110-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..a3a945d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-110-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-110-datetime.wbxml b/test/fixtures/upstream/wv/wv-110-datetime.wbxml new file mode 100644 index 0000000..a3a945d Binary files /dev/null and b/test/fixtures/upstream/wv/wv-110-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-110-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-110-datetime.wbxml.xml new file mode 100644 index 0000000..abfd354 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-110-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13Z +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-110-datetime.xml b/test/fixtures/upstream/wv/wv-110-datetime.xml new file mode 100644 index 0000000..9e60fec --- /dev/null +++ b/test/fixtures/upstream/wv/wv-110-datetime.xml @@ -0,0 +1,65 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13Z + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-111-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-111-datetime.anon.wbxml new file mode 100644 index 0000000..a9ea533 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-111-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-111-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-111-datetime.anon.wbxml.xml new file mode 100644 index 0000000..d8ca63c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-111-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13A +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-111-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-111-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..a9ea533 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-111-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-111-datetime.wbxml b/test/fixtures/upstream/wv/wv-111-datetime.wbxml new file mode 100644 index 0000000..a9ea533 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-111-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-111-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-111-datetime.wbxml.xml new file mode 100644 index 0000000..d8ca63c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-111-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13A +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-111-datetime.xml b/test/fixtures/upstream/wv/wv-111-datetime.xml new file mode 100644 index 0000000..b9b2abf --- /dev/null +++ b/test/fixtures/upstream/wv/wv-111-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13A + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-112-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-112-datetime.anon.wbxml new file mode 100644 index 0000000..a7dcdbe Binary files /dev/null and b/test/fixtures/upstream/wv/wv-112-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-112-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-112-datetime.anon.wbxml.xml new file mode 100644 index 0000000..b40fa03 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-112-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+01:00 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-112-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-112-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..a7dcdbe Binary files /dev/null and b/test/fixtures/upstream/wv/wv-112-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-112-datetime.wbxml b/test/fixtures/upstream/wv/wv-112-datetime.wbxml new file mode 100644 index 0000000..a7dcdbe Binary files /dev/null and b/test/fixtures/upstream/wv/wv-112-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-112-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-112-datetime.wbxml.xml new file mode 100644 index 0000000..b40fa03 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-112-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+01:00 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-112-datetime.xml b/test/fixtures/upstream/wv/wv-112-datetime.xml new file mode 100644 index 0000000..e6fa88e --- /dev/null +++ b/test/fixtures/upstream/wv/wv-112-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13+01:00 + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-113-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-113-datetime.anon.wbxml new file mode 100644 index 0000000..71b3722 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-113-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-113-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-113-datetime.anon.wbxml.xml new file mode 100644 index 0000000..ae3a28c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-113-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+0100 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-113-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-113-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..71b3722 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-113-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-113-datetime.wbxml b/test/fixtures/upstream/wv/wv-113-datetime.wbxml new file mode 100644 index 0000000..71b3722 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-113-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-113-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-113-datetime.wbxml.xml new file mode 100644 index 0000000..ae3a28c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-113-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+0100 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-113-datetime.xml b/test/fixtures/upstream/wv/wv-113-datetime.xml new file mode 100644 index 0000000..eb1b6ad --- /dev/null +++ b/test/fixtures/upstream/wv/wv-113-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13+0100 + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-114-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-114-datetime.anon.wbxml new file mode 100644 index 0000000..5931078 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-114-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-114-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-114-datetime.anon.wbxml.xml new file mode 100644 index 0000000..55ef1e2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-114-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+01 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-114-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-114-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..5931078 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-114-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-114-datetime.wbxml b/test/fixtures/upstream/wv/wv-114-datetime.wbxml new file mode 100644 index 0000000..5931078 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-114-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-114-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-114-datetime.wbxml.xml new file mode 100644 index 0000000..55ef1e2 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-114-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+01 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-114-datetime.xml b/test/fixtures/upstream/wv/wv-114-datetime.xml new file mode 100644 index 0000000..e9afb07 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-114-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13+01 + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-115-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-115-datetime.anon.wbxml new file mode 100644 index 0000000..5bc8fdf Binary files /dev/null and b/test/fixtures/upstream/wv/wv-115-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-115-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-115-datetime.anon.wbxml.xml new file mode 100644 index 0000000..10e5e59 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-115-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+1 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-115-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-115-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..5bc8fdf Binary files /dev/null and b/test/fixtures/upstream/wv/wv-115-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-115-datetime.wbxml b/test/fixtures/upstream/wv/wv-115-datetime.wbxml new file mode 100644 index 0000000..5bc8fdf Binary files /dev/null and b/test/fixtures/upstream/wv/wv-115-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-115-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-115-datetime.wbxml.xml new file mode 100644 index 0000000..10e5e59 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-115-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13+1 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-115-datetime.xml b/test/fixtures/upstream/wv/wv-115-datetime.xml new file mode 100644 index 0000000..ed0eff7 --- /dev/null +++ b/test/fixtures/upstream/wv/wv-115-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13+1 + + 600 + + + + + + + diff --git a/test/fixtures/upstream/wv/wv-116-datetime.anon.wbxml b/test/fixtures/upstream/wv/wv-116-datetime.anon.wbxml new file mode 100644 index 0000000..3d95920 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-116-datetime.anon.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-116-datetime.anon.wbxml.xml b/test/fixtures/upstream/wv/wv-116-datetime.anon.wbxml.xml new file mode 100644 index 0000000..478db2c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-116-datetime.anon.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13-05:00 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-116-datetime.nostrtbl.wbxml b/test/fixtures/upstream/wv/wv-116-datetime.nostrtbl.wbxml new file mode 100644 index 0000000..3d95920 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-116-datetime.nostrtbl.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-116-datetime.wbxml b/test/fixtures/upstream/wv/wv-116-datetime.wbxml new file mode 100644 index 0000000..3d95920 Binary files /dev/null and b/test/fixtures/upstream/wv/wv-116-datetime.wbxml differ diff --git a/test/fixtures/upstream/wv/wv-116-datetime.wbxml.xml b/test/fixtures/upstream/wv/wv-116-datetime.wbxml.xml new file mode 100644 index 0000000..478db2c --- /dev/null +++ b/test/fixtures/upstream/wv/wv-116-datetime.wbxml.xml @@ -0,0 +1,45 @@ + + + + + +Inband +im.user.com#48815@server.com + + + +Request +IMApp01#12345@NOK5110 +F + + + + +0x0000f132 +text/plain +None +189 + + + +Johnnie +wv:john/chatgroup@there.com + + + + + + +Wicked Vicky +wv:john/chatgroup@there.com + + + +2001-09-25T13:40:13-05:00 +600 + + + + + + diff --git a/test/fixtures/upstream/wv/wv-116-datetime.xml b/test/fixtures/upstream/wv/wv-116-datetime.xml new file mode 100644 index 0000000..f8c06dc --- /dev/null +++ b/test/fixtures/upstream/wv/wv-116-datetime.xml @@ -0,0 +1,66 @@ + + + + + + Inband + + im.user.com#48815@server.com + + + + + Request + + IMApp01#12345@NOK5110 + + F + + + + + + 0x0000f132 + + text/plain + + None + + 189 + + + + + Johnnie + + wv:john/chatgroup@there.com + + + + + + + + Wicked Vicky + + wv:john/chatgroup@there.com + + + + + + 2001-09-25T13:40:13-05:00 + + 600 + + + + + + + diff --git a/test/libwbxml/base64_test.exs b/test/libwbxml/base64_test.exs new file mode 100644 index 0000000..6df95c1 --- /dev/null +++ b/test/libwbxml/base64_test.exs @@ -0,0 +1,71 @@ +defmodule Libwbxml.Base64Test do + use ExUnit.Case, async: true + + alias Libwbxml.Base64 + + doctest Libwbxml.Base64 + + # Expected values were produced by upstream's wbxml_buffer_decode_base64 / + # wbxml_base64_decode(buf, -1, ...) / wbxml_base64_encode. + + describe "encode/1" do + test "standard alphabet with padding" do + assert Base64.encode(<<0x74>>) == "dA==" + assert Base64.encode(<<0x74, 0x65>>) == "dGU=" + assert Base64.encode(<<0x74, 0x65, 0x73>>) == "dGVz" + assert Base64.encode(<<0xFF, 0xFF, 0xFF>>) == "////" + assert Base64.encode(<<0xFB, 0xFF>>) == "+/8=" + assert Base64.encode(<<0>>) == "AA==" + end + end + + describe "decode/1 (wbxml_buffer_decode_base64)" do + test "strips blanks anywhere before decoding" do + assert Base64.decode("dGVz dA==") == {:ok, "test"} + assert Base64.decode("dGVz\ndA==") == {:ok, "test"} + assert Base64.decode(" dGVz\r\n\tdA==\n") == {:ok, "test"} + end + + test "accepts missing or short padding" do + assert Base64.decode("dGVzdA") == {:ok, "test"} + assert Base64.decode("dGVzdA=") == {:ok, "test"} + assert Base64.decode("dGVzd") == {:ok, "tes"} + assert Base64.decode("AA") == {:ok, <<0>>} + assert Base64.decode("AAA") == {:ok, <<0, 0>>} + assert Base64.decode("AAAAA") == {:ok, <<0, 0, 0>>} + assert Base64.decode("AAAAAA") == {:ok, <<0, 0, 0, 0>>} + assert Base64.decode("AAAAAAA") == {:ok, <<0, 0, 0, 0, 0>>} + end + + test "ignores leftover bits and everything after the first invalid byte" do + assert Base64.decode("dGVzdB==") == {:ok, "test"} + assert Base64.decode("dGVz*dA==") == {:ok, "tes"} + assert Base64.decode("dGVzdA==garbage") == {:ok, "test"} + assert Base64.decode("dGVzdA==dGVzdA==") == {:ok, "test"} + assert Base64.decode("dGVzdA=dGVzdA==") == {:ok, "test"} + end + + test "fails only when nothing decodes" do + assert Base64.decode("") == {:error, :b64_dec} + assert Base64.decode("d") == {:error, :b64_dec} + assert Base64.decode("====") == {:error, :b64_dec} + assert Base64.decode("*") == {:error, :b64_dec} + assert Base64.decode(" \n") == {:error, :b64_dec} + end + + test "does not accept the URL-safe alphabet" do + assert Base64.decode("-_") == {:error, :b64_dec} + end + end + + describe "decode_raw/1 (wbxml_base64_decode)" do + test "stops at blanks and never fails" do + assert Base64.decode_raw("dGVzdA==") == "test" + assert Base64.decode_raw("dGVz dA==") == "tes" + assert Base64.decode_raw("dGVz*dA==") == "tes" + assert Base64.decode_raw("dGVzd") == "tes" + assert Base64.decode_raw("d") == "" + assert Base64.decode_raw("") == "" + end + end +end diff --git a/test/libwbxml/charset_test.exs b/test/libwbxml/charset_test.exs new file mode 100644 index 0000000..6300c4d --- /dev/null +++ b/test/libwbxml/charset_test.exs @@ -0,0 +1,96 @@ +defmodule Libwbxml.CharsetTest do + use ExUnit.Case, async: true + + alias Libwbxml.Charset + + doctest Libwbxml.Charset + + test "the table has upstream's 15 entries with their MIBenum values" do + assert length(Charset.entries()) == 15 + assert Charset.from_name("US-ASCII") == {:ok, 3} + assert Charset.from_name("ISO-8859-1") == {:ok, 4} + assert Charset.from_name("Shift_JIS") == {:ok, 17} + assert Charset.from_name("UTF-8") == {:ok, 106} + assert Charset.from_name("ISO-10646-UCS-2") == {:ok, 1000} + assert Charset.from_name("UTF-16") == {:ok, 1015} + assert Charset.from_name("Big5") == {:ok, 2026} + assert Charset.utf_8() == 106 + assert Charset.us_ascii() == 3 + assert Charset.unknown() == 0 + end + + test "names are matched case-insensitively and round-trip" do + for {name, mib} <- Charset.entries() do + assert Charset.from_name(String.downcase(name)) == {:ok, mib} + assert Charset.from_name(String.upcase(name)) == {:ok, mib} + assert Charset.name(mib) == {:ok, name} + end + + assert Charset.from_name("") == :error + assert Charset.name(0) == :error + end + + describe "to_utf8/2 and from_utf8/2" do + test "US-ASCII and UTF-8 pass through without validation" do + high = <<"caf", 0xE9, 0xFF>> + + for mib <- [Charset.us_ascii(), Charset.utf_8()] do + assert Charset.to_utf8(high, mib) == {:ok, high} + assert Charset.from_utf8(high, mib) == {:ok, high} + end + end + + test "ISO-8859-1" do + assert Charset.to_utf8(<<"caf", 0xE9>>, 4) == {:ok, "café"} + assert Charset.from_utf8("café", 4) == {:ok, <<"caf", 0xE9>>} + assert Charset.from_utf8("€", 4) == {:error, :charset_conv} + end + + test "UTF-16 honours a BOM on input and writes big-endian without one" do + assert Charset.to_utf8(<<0, ?a, 0, ?b>>, 1015) == {:ok, "ab"} + assert Charset.to_utf8(<<0xFE, 0xFF, 0, ?a>>, 1015) == {:ok, "a"} + assert Charset.to_utf8(<<0xFF, 0xFE, ?a, 0>>, 1015) == {:ok, "a"} + assert Charset.from_utf8("ab", 1015) == {:ok, <<0, ?a, 0, ?b>>} + assert Charset.to_utf8(<<0, ?a, 0>>, 1015) == {:error, :charset_conv} + end + + test "UCS-2 is treated as UTF-16 big-endian" do + assert Charset.to_utf8(<<0x00, 0xE9>>, 1000) == {:ok, "é"} + assert Charset.from_utf8("é", 1000) == {:ok, <<0x00, 0xE9>>} + end + + test "every other charset is not convertible, as in the no-iconv build" do + for mib <- [5, 12, 17, 2026, 0, 42] do + assert Charset.to_utf8("x", mib) == {:error, :no_charset_conv} + assert Charset.from_utf8("x", mib) == {:error, :no_charset_conv} + end + end + end + + describe "split_terminated/2" do + test "single-byte terminator" do + assert Charset.split_terminated(<<0, "rest">>, 106) == {:ok, "", "rest"} + assert Charset.split_terminated(<<"abc", 0>>, 3) == {:ok, "abc", ""} + assert Charset.split_terminated("abc", 106) == {:error, :charset_str_len} + assert Charset.split_terminated("", 106) == {:error, :charset_str_len} + end + + test "two-byte terminator on 2-byte boundaries" do + assert Charset.split_terminated(<<0, ?a, 0, ?b, 0, 0, ?x>>, 1015) == + {:ok, <<0, ?a, 0, ?b>>, "x"} + + assert Charset.split_terminated(<<0, 0>>, 1000) == {:ok, "", ""} + # a 0,0 pair straddling a boundary is not a terminator + assert Charset.split_terminated(<>, 1015) == {:error, :charset_str_len} + assert Charset.split_terminated(<>, 1015) == {:error, :charset_str_len} + assert Charset.split_terminated(<<>>, 1015) == {:error, :charset_str_len} + end + + test "terminator_size/1" do + assert Charset.terminator_size(1015) == 2 + assert Charset.terminator_size(1000) == 2 + assert Charset.terminator_size(106) == 1 + assert Charset.terminator_size(4) == 1 + end + end +end diff --git a/test/libwbxml/encoder_test.exs b/test/libwbxml/encoder_test.exs new file mode 100644 index 0000000..69604c7 --- /dev/null +++ b/test/libwbxml/encoder_test.exs @@ -0,0 +1,258 @@ +defmodule Libwbxml.EncoderTest do + @moduledoc """ + Unit tests for `Libwbxml.Encoder` (through `Libwbxml.encode/2` for XML + input). Every expected byte string below was produced by the upstream C + tool on the same input: `xml2wbxml [-n] [-a] [-k] [-v 1.x] -o out.wbxml in.xml` + (libwbxml 0.11.10), then `xxd -p`. + """ + use ExUnit.Case, async: true + + import Bitwise + + alias Libwbxml.{Encoder, Tables, Tree} + alias Libwbxml.Tree.{Element, Text} + + @si_doctype ~s() + @as_doctype ~s() + @wv_doctype ~s() + @syncml11_doctype ~s() + + @ping @as_doctype <> ~s(1) + @ping_public_id "0300006a212d2f2f4d4943524f534f46542f2f4454442041637469766553796e632f2f454e00000d4500004e0331000101" + @ping_anonymous "03016a00000d4500004e0331000101" + + # with an attribute value used twice ("alpha beta"), text used once + # and words ("hello", "world") shared by two text nodes. + @strtbl_xml @si_doctype <> + ~s(hello world) <> + ~s(hello world againalpha gamma) + @strtbl_wbxml "03056a17616c70686120626574610068656c6c6f00776f726c640045c60c036578616d706c65008503610011830001830b03200083110147c812830001830b03200083110320616761696e0001c8120378000103616c7068612067616d6d6100010101" + @strtbl_nostrtbl "03056a0045c60c036578616d706c6500850361001103616c706861206265746100010368656c6c6f20776f726c64000147c81203616c706861206265746100010368656c6c6f20776f726c6420616761696e0001c8120378000103616c7068612067616d6d6100010101" + + defp hex(hex), do: Base.decode16!(hex, case: :lower) + + defp encode!(xml, opts \\ []) do + assert {:ok, wbxml} = Libwbxml.encode(xml, opts) + wbxml + end + + describe "header" do + test "WBXML public ID of the language" do + assert <<0x03, 0x05, 0x6A, 0x00, _::binary>> = encode!(@si_doctype <> "") + end + + test "languages without a WBXML public ID reference their XML public ID in the string table" do + assert encode!(@ping, anonymous: false) == hex(@ping_public_id) + # ... which is the only table entry when the string table is disabled. + assert encode!(@ping, anonymous: false, string_table: false) == hex(@ping_public_id) + end + + test "anonymous documents write 0x01 instead, but keep a real public ID" do + assert encode!(@ping) == hex(@ping_anonymous) + assert encode!(@ping, string_table: false) == hex(@ping_anonymous) + assert <<0x03, 0x05, 0x6A, _::binary>> = encode!(@si_doctype <> "", anonymous: true) + end + + test "version byte" do + for {version, byte} <- [{:"1.0", 0x00}, {:"1.1", 0x01}, {:"1.2", 0x02}, {:"1.3", 0x03}] do + assert <<^byte, 0x05, 0x6A, _::binary>> = + encode!(@si_doctype <> "", version: version) + end + end + + test "charset is always UTF-8 (0x6A), even for ISO-8859-1 input" do + xml = + ~s() <> + @si_doctype <> "caf\xE9" + + assert <<0x03, 0x05, 0x6A, 0x00, 0x45, 0x46, 0x03, "café", 0x00, 0x01, 0x01>> = encode!(xml) + end + end + + describe "string table" do + test "strings referenced twice, then words referenced twice, in document order" do + assert encode!(@strtbl_xml, anonymous: false) == hex(@strtbl_wbxml) + end + + test "disabled: everything inline" do + assert encode!(@strtbl_xml, anonymous: false, string_table: false) == hex(@strtbl_nostrtbl) + end + + test "literal names are appended to the table" do + xml = + @si_doctype <> + ~s(t) + + # LITERAL 0 for `bogus`, plain `href` start (no matching prefix) with an + # inline value, `action="signal-high"` fully tokenised. + assert encode!(xml) == + hex("03056a06626f6775730045c604000376000b036674703a2f2f782f790008010374000101") + end + + test "a literal without a string table is an error" do + xml = @as_doctype <> ~s(1) + assert {:ok, _} = Libwbxml.encode(xml) + assert Libwbxml.encode(xml, string_table: false) == {:error, :strtbl_disabled} + end + + test "upstream quirk: a table entry shared with a text node is stripped with it" do + # " hello world " is collected (15 bytes, used twice) before the text + # is stripped, so the header announces 16 table bytes but only + # "hello world\0" (12) are written, and both nodes reference offset 0. + xml = + @si_doctype <> + ~s( hello world hello world ) + + assert encode!(xml) == + hex("03056a1068656c6c6f20776f726c6400454683000147c812037800018300010101") + end + end + + describe "text" do + test "whitespace-only text is dropped but still counts as content; blanks are stripped" do + xml = @as_doctype <> ~s( 1 ) + assert encode!(xml) == hex("03016a06426f67757300000d4500004e0331000144000101") + end + + test "preserve_whitespace keeps it all" do + xml = @as_doctype <> ~s( 1 ) + + assert encode!(xml, preserve_whitespace: true) == + hex("03016a06426f67757300000d4500004e03203120000144000320000101") + end + + test "attribute values: start-token prefix, value tokens and the remaining string" do + xml = + ~s() + + # mailbox="mailat: (0x07) STR_I "a@b" ".com" (0x85); timestamp opaque datetime + assert encode!(xml) == hex("030d6a00850703614062008505c3072002041606401201") + end + end + + describe "opaque content" do + test "SI datetime attributes (trailing zero bytes removed)" do + xml = + @si_doctype <> + ~s(x) + + assert encode!(xml) == hex("03056a0045c60ac3072002041606401210c30420020416010378000101") + + assert Libwbxml.encode( + @si_doctype <> ~s(x) + ) == + {:error, :bad_datetime} + end + + test "Wireless-Village integers, datetimes and extension tokens (no string table)" do + xml = + @wv_doctype <> + ~s(Inband20020020416T064012T) + + assert encode!(xml) == + hex("03106a00496d6e708011014bc301c80151c3061f49206a0c000161802c01010101") + + inline = + @wv_doctype <> + ~s(2002-04-16T06:40:12Z) + + assert encode!(inline) == + hex("03106a00495103323030322d30342d31365430363a34303a31325a000101") + end + + test "ActiveSync binary tags" do + xml = + @as_doctype <> + ~s(AQID) + + assert encode!(xml, anonymous: false) == + hex( + "0300006a212d2f2f4d4943524f534f46542f2f4454442041637469766553796e632f2f454e00455c4f56475d000f60c30301020301010101010101" + ) + end + + test "OTA Settings Nokia icon" do + xml = + ~s() + + assert encode!(xml) == + hex( + "03016a0045c67f0187100349434f4e0011c306474946383961018717110352306c474f446c6800010101" + ) + end + + test "SyncML vObject data: CDATA section as opaque with CRLF line ends" do + xml = + @syncml11_doctype <> + "1text/x-vcardBEGIN:VCARD\nEND:VCARD" + + assert encode!(xml) == + hex( + "039f536a006d6b454b033100015a00015303746578742f782d76636172640001010000544fc316424547494e3a56434152440d0a454e443a56434152440101010101" + ) + end + + test "SyncML embedded DevInf: a complete WBXML document inside OPAQUE, +xml type rewritten" do + xml = + @syncml11_doctype <> + ~s(2application/vnd.syncml-devinf+xmlAcme) + + assert encode!(xml) == + hex( + "039f536a006d6b5f4b033200015a000153036170706c69636174696f6e2f766e642e73796e636d6c2d646576696e662b7762786d6c0001010000544fc30f039f546a004a510341636d650001010101010101" + ) + end + + test "DRMREL is base64 in XML and binary in WBXML" do + # Not reachable from XML (expat strips the `ds:` prefix, making the + # element a literal), so the tree is built by hand. + lang = Tables.get(:drmrel10) + rights = Tables.tag_from_xml(lang, 0, "o-ex:rights") + key_value = Tables.tag_from_xml(lang, 0, "ds:KeyValue") + assert %{page: 0x00, token: 0x0C} = key_value + + tree = %Tree{ + lang: :drmrel10, + root: %Element{ + name: {:token, rights}, + children: [%Element{name: {:token, key_value}, children: [%Text{data: "AQID"}]}] + } + } + + assert Encoder.encode(tree, %{anonymous: false}) == + {:ok, + <<0x03, Tables.wbxml_public_id(:drmrel10), 0x6A, 0x00, rights.token ||| 0x40, + 0x0C ||| 0x40, 0xC3, 3, 1, 2, 3, 0x01, 0x01>>} + end + end + + describe "robustness" do + test "never raises on arbitrary input" do + assert Libwbxml.encode(<<>>) == {:error, :bad_parameter} + assert Libwbxml.encode("<") == {:error, :xml_parsing_failed} + assert {:error, :xml_parsing_failed} = Libwbxml.encode(:crypto.strong_rand_bytes(100)) + + assert Libwbxml.encode(~s()) == + {:error, :unknown_xml_language} + + deep = String.duplicate("", 3000) <> String.duplicate("", 3000) + assert {:ok, <<0x03, 0x01, 0x6A, 0x00, _::binary>>} = Libwbxml.encode(@as_doctype <> deep) + end + + test "a tree without a language or root is rejected" do + assert Encoder.encode(%Tree{lang: nil, root: %Element{name: {:literal, "x"}}}, %{}) == + {:error, :bad_parameter} + + assert Encoder.encode(%Tree{lang: :si10, root: nil}, %{}) == {:error, :bad_parameter} + end + + test "a processing instruction node cannot be encoded" do + tree = %Tree{ + lang: :si10, + root: %Element{name: {:literal, "si"}, children: [%Tree.PI{target: "x"}]} + } + + assert Encoder.encode(tree, %{}) == {:error, :not_implemented} + end + end +end diff --git a/test/libwbxml/error_test.exs b/test/libwbxml/error_test.exs new file mode 100644 index 0000000..f35a962 --- /dev/null +++ b/test/libwbxml/error_test.exs @@ -0,0 +1,113 @@ +defmodule Libwbxml.ErrorTest do + use ExUnit.Case, async: true + + alias Libwbxml.Error + + doctest Libwbxml.Error + + # Upstream wbxml_errors.h, in enum order. + @appendix_b ~w( + attr_table_undefined bad_datetime bad_parameter internal + lang_table_undefined not_enough_memory not_implemented + tag_table_undefined b64_enc b64_dec wv_datetime_format + no_charset_conv charset_str_len charset_unknown charset_conv_init + charset_conv charset_not_found attr_value_table_undefined + bad_literal_index bad_null_terminated_string_in_string_table + bad_opaque_length empty_wbxml end_of_buffer entity_code_overflow + ext_value_table_undefined invalid_strtbl_index + literal_not_null_terminated_in_string_table + not_null_terminated_inline_string null_parser null_string_table + string_expected strtbl_length unknown_attr unknown_attr_value + unknown_extension_token unknown_extension_value unknown_public_id + unknown_tag unvalid_mbuint32 wv_integer_overflow encoder_append_data + strtbl_disabled unknown_xml_language xml_node_not_allowed + xml_null_attr_name xml_parsing_failed xml_devinf_conv_failed + no_xmlparser xmlparser_output_utf16 invalid_unicode + )a + + test "reasons/0 lists every WBXML_ERROR_* value in enum order" do + assert Error.reasons() == @appendix_b + assert length(Error.reasons()) == 50 + refute :ok in Error.reasons() + refute :not_encoded in Error.reasons() + end + + test "every reason has an upstream message and a unique code" do + for reason <- Error.reasons() do + message = Error.message(reason) + assert is_binary(message) and message != "Unknown Error Code", inspect(reason) + code = Error.code(reason) + assert Error.from_code(code) == reason + assert Error.message(code) == message + assert Error.from_message(message) == reason + end + + assert Error.reasons() |> Enum.map(&Error.code/1) |> Enum.uniq() |> length() == 50 + end + + test "codes match wbxml_errors.h" do + assert Error.code(:ok) == 0 + assert Error.code(:not_encoded) == 1 + assert Error.code(:attr_table_undefined) == 10 + assert Error.code(:wv_datetime_format) == 20 + assert Error.code(:no_charset_conv) == 30 + assert Error.code(:charset_not_found) == 35 + assert Error.code(:attr_value_table_undefined) == 40 + assert Error.code(:strtbl_length) == 54 + assert Error.code(:unknown_attr) == 60 + assert Error.code(:unknown_tag) == 65 + assert Error.code(:unvalid_mbuint32) == 70 + assert Error.code(:wv_integer_overflow) == 80 + assert Error.code(:encoder_append_data) == 90 + assert Error.code(:strtbl_disabled) == 100 + assert Error.code(:xml_parsing_failed) == 104 + assert Error.code(:xml_devinf_conv_failed) == 110 + assert Error.code(:no_xmlparser) == 120 + assert Error.code(:xmlparser_output_utf16) == 121 + assert Error.code(:invalid_unicode) == 122 + end + + test "messages are upstream's verbatim" do + assert Error.message(:ok) == "No Error" + assert Error.message(:not_encoded) == "Not Encoded" + + assert Error.message(:strtbl_disabled) == + "String Table generation disabled: can't encode Literal" + + assert Error.message(:unknown_xml_language) == "The XML language is unknown." + + assert Error.message(:no_charset_conv) == + "No built-in charset converter (Compiled without libiconv)" + + assert Error.message(:xmlparser_output_utf16) == + "XML Parser (Expat) is outputting UTF-16, so you have two choices :\n" <> + " - Get the iconv library (http://www.gnu.org/software/libiconv/)\n" <> + " - Use a version of Expat that output UTF-8" + + assert Error.message(:nope) == "Unknown Error Code" + assert Error.message(nil) == "Unknown Error Code" + assert Error.message(2) == "Unknown Error Code" + end + + test "from_message/1 accepts charlists" do + assert Error.from_message(~c"Bad String Table Length") == :strtbl_length + assert Error.from_message("nope") == nil + assert Error.from_message(~c"") == nil + end + + test "is an exception carrying the reason" do + error = + assert_raise Error, "Unknown Public ID", fn -> raise Error, reason: :unknown_public_id end + + assert error.reason == :unknown_public_id + assert Exception.message(error) == "Unknown Public ID" + + error = + assert_raise Error, "custom", fn -> raise Error, reason: :internal, message: "custom" end + + assert error.reason == :internal + + assert %Error{reason: :b64_dec, message: "Failed to decode Base64"} = + Error.exception(:b64_dec) + end +end diff --git a/test/libwbxml/opaque_test.exs b/test/libwbxml/opaque_test.exs new file mode 100644 index 0000000..85d7d7b --- /dev/null +++ b/test/libwbxml/opaque_test.exs @@ -0,0 +1,262 @@ +defmodule Libwbxml.OpaqueTest do + use ExUnit.Case, async: true + + alias Libwbxml.Opaque + + doctest Libwbxml.Opaque + + # Every expected value below was produced by running the upstream C + # functions (decode_datetime, wbxml_encode_datetime, decode_wv_integer, + # wbxml_encode_wv_integer, decode_wv_datetime, wbxml_encode_wv_datetime) + # from libwbxml 0.11.10 through a small harness. + + describe "decode_datetime/1" do + test "decodes 4 to 7 BCD bytes, zero-filling omitted fields" do + assert Opaque.decode_datetime(<<0x20, 0x02, 0x04, 0x16, 0x06, 0x40, 0x12>>) == + {:ok, "2002-04-16T06:40:12Z"} + + assert Opaque.decode_datetime(<<0x20, 0x02, 0x04, 0x16>>) == {:ok, "2002-04-16T00:00:00Z"} + end + + test "rejects fewer than 4 or more than 7 bytes" do + assert Opaque.decode_datetime(<<>>) == {:error, :bad_datetime} + assert Opaque.decode_datetime(<<0x20, 0x02, 0x04>>) == {:error, :bad_datetime} + + assert Opaque.decode_datetime(<<0x20, 0x02, 0x04, 0x16, 0x06, 0x40, 0x12, 0x34>>) == + {:error, :bad_datetime} + end + + test "does not validate BCD nibbles (upstream copies hex digits verbatim)" do + assert Opaque.decode_datetime(<<0xAB, 0xCD, 0xEF, 0x12>>) == {:ok, "ABCD-EF-12T00:00:00Z"} + + assert Opaque.decode_datetime(<<0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD>>) == + {:ok, "1234-56-78T90:AB:CDZ"} + end + end + + describe "encode_datetime/1" do + test "packs digits as BCD and strips trailing zero bytes" do + assert Opaque.encode_datetime("2002-04-16T06:40:12Z") == + {:ok, <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40, 0x12>>} + + assert Opaque.encode_datetime("2002-04-16T06:40:00Z") == + {:ok, <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40>>} + + assert Opaque.encode_datetime("2002-04-16T00:00:00Z") == {:ok, <<0x20, 0x02, 0x04, 0x16>>} + assert Opaque.encode_datetime("2002-04-16") == {:ok, <<0x20, 0x02, 0x04, 0x16>>} + + assert Opaque.encode_datetime("20020416T0640") == + {:ok, <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40>>} + + assert Opaque.encode_datetime("2000-01-01T00:00:00Z") == {:ok, <<0x20, 0x00, 0x01, 0x01>>} + end + + test "drops an odd trailing digit" do + assert Opaque.encode_datetime("2002-04-16T06:40:1Z") == + {:ok, <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40>>} + end + + test "inputs that become empty produce an empty opaque" do + assert Opaque.encode_datetime("0000") == {:ok, <<>>} + assert Opaque.encode_datetime("TZ-:") == {:ok, <<>>} + assert Opaque.encode_datetime("1") == {:ok, <<>>} + # NOTE(upstream-quirk): C dereferences NULL here; the port returns an empty opaque. + assert Opaque.encode_datetime("") == {:ok, <<>>} + end + + test "rejects any character other than digits, T, Z, - and :" do + for bad <- [ + "2002/04/16", + "abc", + "2002-04-16T06:40:12.5Z", + "2002-04-16 06:40:12", + "2002-04-16T06:40:12z" + ] do + assert Opaque.encode_datetime(bad) == {:error, :bad_datetime}, bad + end + end + end + + describe "decode_wv_integer/1" do + test "decodes big-endian bytes to a decimal string" do + assert Opaque.decode_wv_integer(<<>>) == {:ok, "0"} + assert Opaque.decode_wv_integer(<<0x00>>) == {:ok, "0"} + assert Opaque.decode_wv_integer(<<0x01>>) == {:ok, "1"} + assert Opaque.decode_wv_integer(<<0xFF>>) == {:ok, "255"} + assert Opaque.decode_wv_integer(<<0x01, 0x00>>) == {:ok, "256"} + assert Opaque.decode_wv_integer(<<0xFF, 0xFF, 0xFF, 0xFF>>) == {:ok, "4294967295"} + end + + test "wraps modulo 2^32 instead of reporting overflow (32-bit WB_ULONG upstream)" do + assert Opaque.decode_wv_integer(<<0x01, 0, 0, 0, 0>>) == {:ok, "0"} + assert Opaque.decode_wv_integer(<<0, 0, 0, 0, 0xFF>>) == {:ok, "255"} + assert Opaque.decode_wv_integer(<<0x01, 0, 0, 0, 0, 0, 0, 0, 0>>) == {:ok, "0"} + assert Opaque.decode_wv_integer(<<0, 0, 0, 0, 0, 0, 0, 1>>) == {:ok, "1"} + + assert Opaque.decode_wv_integer(<<0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF>>) == + {:ok, "4294967295"} + + assert Opaque.decode_wv_integer(<<0, 0, 0, 1, 0xFF, 0xFF, 0xFF, 0xFF>>) == + {:ok, "4294967295"} + end + end + + describe "encode_wv_integer/1" do + test "writes the minimal big-endian bytes" do + assert Opaque.encode_wv_integer("0") == {:ok, <<>>} + assert Opaque.encode_wv_integer("1") == {:ok, <<0x01>>} + assert Opaque.encode_wv_integer("255") == {:ok, <<0xFF>>} + assert Opaque.encode_wv_integer("256") == {:ok, <<0x01, 0x00>>} + assert Opaque.encode_wv_integer("65536") == {:ok, <<0x01, 0x00, 0x00>>} + assert Opaque.encode_wv_integer("4294967295") == {:ok, <<0xFF, 0xFF, 0xFF, 0xFF>>} + end + + test "parses hex when the second character is x/X (strtol base 16)" do + assert Opaque.encode_wv_integer("0x1A") == {:ok, <<0x1A>>} + assert Opaque.encode_wv_integer("0X1a") == {:ok, <<0x1A>>} + assert Opaque.encode_wv_integer("0x") == {:ok, <<>>} + assert Opaque.encode_wv_integer("0xZZ") == {:ok, <<>>} + assert Opaque.encode_wv_integer("0xFFFFFFFFFF") == {:ok, <<0xFF, 0xFF, 0xFF, 0xFF>>} + assert Opaque.encode_wv_integer("1x5") == {:ok, <<0x01>>} + assert Opaque.encode_wv_integer("x5") == {:ok, <<>>} + end + + test "parses like atol otherwise: blanks, sign, stop at first non-digit" do + assert Opaque.encode_wv_integer(" 12") == {:ok, <<0x0C>>} + assert Opaque.encode_wv_integer("12abc") == {:ok, <<0x0C>>} + assert Opaque.encode_wv_integer("+7") == {:ok, <<0x07>>} + assert Opaque.encode_wv_integer("abc") == {:ok, <<>>} + assert Opaque.encode_wv_integer("") == {:ok, <<>>} + end + + test "truncates to 32 bits after 64-bit saturation" do + assert Opaque.encode_wv_integer("4294967296") == {:ok, <<>>} + assert Opaque.encode_wv_integer("-1") == {:ok, <<0xFF, 0xFF, 0xFF, 0xFF>>} + assert Opaque.encode_wv_integer("99999999999999999999") == {:ok, <<0xFF, 0xFF, 0xFF, 0xFF>>} + assert Opaque.encode_wv_integer("-99999999999999999999") == {:ok, <<>>} + end + + test "round-trips through decode_wv_integer/1" do + for text <- ["0", "1", "255", "256", "65536", "4294967295"] do + {:ok, bytes} = Opaque.encode_wv_integer(text) + assert Opaque.decode_wv_integer(bytes) == {:ok, text} + end + end + end + + describe "decode_wv_datetime/1" do + test "unpacks 6 bytes, omitting zero seconds" do + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, 0x00>>) == + {:ok, "20020416T064012Z"} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x00, 0x00>>) == + {:ok, "20020416T0640Z"} + + assert Opaque.decode_wv_datetime(<<0, 0, 0, 0, 0, 0>>) == {:ok, "00000T0000Z"} + + assert Opaque.decode_wv_datetime(<<0x00, 0x04, 0x20, 0x6A, 0x0C, 0x00>>) == + {:ok, "10016T064012Z"} + + assert Opaque.decode_wv_datetime(<<0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00>>) == + {:ok, "40951531T316363Z"} + end + + test "time-zone byte: 0 -> Z, A-Z except J kept, anything else dropped" do + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, ?A>>) == + {:ok, "20020416T064012A"} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, ?Z>>) == + {:ok, "20020416T064012Z"} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, ?J>>) == + {:ok, "20020416T064012"} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, ?1>>) == + {:ok, "20020416T064012"} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, ?a>>) == + {:ok, "20020416T064012"} + + assert Opaque.decode_wv_datetime(<<0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF>>) == + {:ok, "40951531T316363"} + end + + test "rejects anything but 6 bytes" do + assert Opaque.decode_wv_datetime(<<>>) == {:error, :wv_datetime_format} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C>>) == + {:error, :wv_datetime_format} + + assert Opaque.decode_wv_datetime(<<0x1F, 0x49, 0x20, 0x6A, 0x0C, 0, 0>>) == + {:error, :wv_datetime_format} + end + end + + describe "encode_wv_datetime/1" do + test "packs the short form into 6 opaque bytes" do + assert Opaque.encode_wv_datetime("20020416T064012") == + {:ok, {:opaque, <<0x1F, 0x49, 0x20, 0x6A, 0x0C, 0x00>>}} + + assert Opaque.encode_wv_datetime("20020416T064012A") == + {:ok, {:opaque, <<0x1F, 0x49, 0x20, 0x6A, 0x0C, ?A>>}} + + assert Opaque.encode_wv_datetime("00000000T000000") == + {:ok, {:opaque, <<0, 0, 0, 0, 0, 0>>}} + end + + test "tolerates missing seconds (13/14 characters)" do + assert Opaque.encode_wv_datetime("20020416T0640") == + {:ok, {:opaque, <<0x1F, 0x49, 0x20, 0x6A, 0x00, 0x00>>}} + + assert Opaque.encode_wv_datetime("20020416T0640A") == + {:ok, {:opaque, <<0x1F, 0x49, 0x20, 0x6A, 0x00, ?A>>}} + end + + test "masks fields wider than their bit width" do + assert Opaque.encode_wv_datetime("40950416T064012") == + {:ok, {:opaque, <<0x3F, 0xFD, 0x20, 0x6A, 0x0C, 0x00>>}} + + assert Opaque.encode_wv_datetime("99991231T235959") == + {:ok, {:opaque, <<0x1C, 0x3F, 0x3F, 0x7E, 0xFB, 0x00>>}} + end + + test "emits the ISO 8601 long form (or a trailing Z) inline" do + assert Opaque.encode_wv_datetime("20020416T064012Z") == {:ok, {:inline, "20020416T064012Z"}} + + assert Opaque.encode_wv_datetime("2002-04-16T06:40:12") == + {:ok, {:inline, "2002-04-16T06:40:12"}} + + assert Opaque.encode_wv_datetime("20020416T064012+") == {:ok, {:inline, "20020416T064012+"}} + assert Opaque.encode_wv_datetime("20020416T064012:") == {:ok, {:inline, "20020416T064012:"}} + end + + test "rejects malformed short forms" do + for bad <- [ + "", + "20020416T064012J", + "20020416T064012a", + "20020416X064012", + "2002041T0640123", + "20020416T06401", + "20020416T0640123", + "abcdefghTijklmn", + "20020416T0640 1", + "20020416T064012Z1", + "20020416T064012ZA", + "12345678T9", + "2002041606401", + "20020416T064" + ] do + assert Opaque.encode_wv_datetime(bad) == {:error, :wv_datetime_format}, bad + end + end + + test "opaque round-trip normalises to the Z-suffixed form" do + {:ok, {:opaque, bytes}} = Opaque.encode_wv_datetime("20020416T064012") + assert Opaque.decode_wv_datetime(bytes) == {:ok, "20020416T064012Z"} + + {:ok, {:opaque, bytes}} = Opaque.encode_wv_datetime("20020416T064012A") + assert Opaque.decode_wv_datetime(bytes) == {:ok, "20020416T064012A"} + end + end +end diff --git a/test/libwbxml/options_test.exs b/test/libwbxml/options_test.exs new file mode 100644 index 0000000..0f49586 --- /dev/null +++ b/test/libwbxml/options_test.exs @@ -0,0 +1,178 @@ +defmodule Libwbxml.OptionsTest do + # Option parsing and result shapes of the public API (Task 2.2 / Task 1.6). + use ExUnit.Case, async: true + + doctest Libwbxml + + @xml File.read!(Path.expand("../fixtures/ping_status_1.xml", __DIR__)) + + test "languages/0 has the 29 upstream languages in WBXMLLanguage order" do + assert length(Libwbxml.languages()) == 29 + assert List.first(Libwbxml.languages()) == :wml10 + assert List.last(Libwbxml.languages()) == :conml + assert :activesync in Libwbxml.languages() + refute :metinf10 in Libwbxml.languages() + assert Enum.uniq(Libwbxml.languages()) == Libwbxml.languages() + end + + describe "encode/2" do + test "default options return a binary" do + assert {:ok, wbxml} = Libwbxml.encode(@xml) + assert is_binary(wbxml) + assert <<0x03, 0x01, 0x6A, _::binary>> = wbxml + + assert Libwbxml.encode(@xml, version: :"1.3", string_table: true, anonymous: true) == + Libwbxml.encode(@xml) + + assert Libwbxml.encode([@xml], []) == Libwbxml.encode(@xml) + end + + test "errors are reason atoms" do + assert Libwbxml.encode("not xml") == {:error, :xml_parsing_failed} + assert Libwbxml.encode("") == {:error, :unknown_xml_language} + end + + test "non-default options change the output" do + assert {:ok, <<0x03, 0x01, 0x6A, _::binary>>} = Libwbxml.encode(@xml) + + assert {:ok, <<0x03, 0x00, 0x00, 0x6A, _::binary>>} = + Libwbxml.encode(@xml, anonymous: false) + + assert {:ok, <<0x02, 0x01, 0x6A, _::binary>>} = Libwbxml.encode(@xml, version: :"1.2") + assert {:ok, _} = Libwbxml.encode(@xml, string_table: false) + assert {:ok, _} = Libwbxml.encode(@xml, preserve_whitespace: true) + assert {:ok, _} = Libwbxml.encode("", language: :activesync) + end + + test "invalid arguments and options raise ArgumentError" do + assert_raise ArgumentError, ~r/expected xml to be a string or iodata/, fn -> + Libwbxml.encode(42) + end + + assert_raise ArgumentError, ~r/keyword list/, fn -> + apply(Libwbxml, :encode, [@xml, :bad]) + end + + assert_raise ArgumentError, ~r/unknown option\(s\) \[:foo\]/, fn -> + Libwbxml.encode(@xml, foo: 1) + end + + assert_raise ArgumentError, ~r/:version.*expected one of/, fn -> + Libwbxml.encode(@xml, version: "1.3") + end + + assert_raise ArgumentError, ~r/:string_table.*boolean/, fn -> + Libwbxml.encode(@xml, string_table: 1) + end + + assert_raise ArgumentError, ~r/:anonymous.*boolean/, fn -> + Libwbxml.encode(@xml, anonymous: nil) + end + + assert_raise ArgumentError, ~r/:language.*languages\/0/, fn -> + Libwbxml.encode(@xml, language: :klingon) + end + end + + test "encode!/2 returns the binary or raises Libwbxml.Error" do + assert is_binary(Libwbxml.encode!(@xml)) + + error = + assert_raise Libwbxml.Error, "Parsing of XML Document Failed", fn -> + Libwbxml.encode!("nope") + end + + assert error.reason == :xml_parsing_failed + end + end + + describe "decode/2" do + setup do + {:ok, wbxml} = Libwbxml.encode(@xml) + %{wbxml: wbxml} + end + + test "default options return a UTF-8 string", %{ + wbxml: wbxml + } do + assert {:ok, xml} = Libwbxml.decode(wbxml) + assert is_binary(xml) + assert String.valid?(xml) + assert String.starts_with?(xml, "\n1" + + assert Libwbxml.decode(wbxml, + language: :activesync, + format: :indent, + indent: 0, + charset: nil + ) == + Libwbxml.decode(wbxml) + end + + test "errors are reason atoms" do + assert Libwbxml.decode(<<1, 2, 3, 4>>) == {:error, :strtbl_length} + assert Libwbxml.decode(<<>>) == {:error, :bad_parameter} + end + + test "non-default options are honoured", %{wbxml: wbxml} do + # The anonymous document carries no public ID, so nothing to detect. + assert Libwbxml.decode(wbxml, language: nil) == {:error, :unknown_public_id} + assert {:ok, " _ = airsync} = Libwbxml.decode(wbxml, language: :airsync) + assert airsync =~ ~s(1\n" + + # The document declares UTF-8, so the fallback charset is unused. + for charset <- ["UTF-8", :iso_8859_1, 106] do + assert Libwbxml.decode(wbxml, charset: charset) == Libwbxml.decode(wbxml) + end + + assert {:ok, _} = Libwbxml.decode(wbxml, preserve_whitespace: true) + end + + test "invalid arguments and options raise ArgumentError", %{wbxml: wbxml} do + assert_raise ArgumentError, ~r/expected wbxml to be a binary/, fn -> + apply(Libwbxml, :decode, [~c"abc"]) + end + + assert_raise ArgumentError, ~r/unknown option\(s\) \[:version\]/, fn -> + Libwbxml.decode(wbxml, version: :"1.3") + end + + assert_raise ArgumentError, ~r/:format.*expected one of/, fn -> + Libwbxml.decode(wbxml, format: :pretty) + end + + assert_raise ArgumentError, ~r/:indent.*non-negative integer/, fn -> + Libwbxml.decode(wbxml, indent: -1) + end + + assert_raise ArgumentError, ~r/:charset/, fn -> + Libwbxml.decode(wbxml, charset: "KOI8-R") + end + + assert_raise ArgumentError, ~r/:charset/, fn -> Libwbxml.decode(wbxml, charset: 42) end + + assert_raise ArgumentError, ~r/:language/, fn -> + Libwbxml.decode(wbxml, language: "activesync") + end + end + + test "decode!/2 returns the string or raises Libwbxml.Error", %{wbxml: wbxml} do + assert Libwbxml.decode!(wbxml) =~ " + Libwbxml.decode!(<<1, 2, 3, 4>>) + end + + assert error.reason == :strtbl_length + end + end +end diff --git a/test/libwbxml/parser_test.exs b/test/libwbxml/parser_test.exs new file mode 100644 index 0000000..c581d4a --- /dev/null +++ b/test/libwbxml/parser_test.exs @@ -0,0 +1,469 @@ +defmodule Libwbxml.ParserTest do + use ExUnit.Case, async: true + + alias Libwbxml.{Parser, Tree} + alias Libwbxml.Tree.{Attribute, CData, Element, SubTree, Text} + + doctest Libwbxml.Parser + + # Every expectation below was checked against `wbxml2xml` (libwbxml + # 0.11.10) on the same bytes; see the vectors in the task report. + + # 03 = WBXML 1.3, 01 = no public ID, 6A = UTF-8, 00 = empty string table. + @anon_header <<3, 1, 0x6A, 0>> + # ActiveSync page 0x0D: Ping = 0x05, Status = 0x07. + @ping_open <<0, 0x0D, 0x45>> + + defp parse!(bin, opts \\ %{language: :activesync}) do + assert {:ok, %Tree{} = tree} = Parser.parse(bin, opts) + tree + end + + defp name(%{name: {:token, %{name: name}}}), do: {:token, name} + defp name(%{name: {:literal, name}}), do: {:literal, name} + + defp text(%Element{children: [%Text{data: data}]}), do: data + + # Follows the first child `depth` times. + defp descend(node, 0), do: node + defp descend(%Element{children: [child | _]}, depth), do: descend(child, depth - 1) + + describe "decode_mb_uint32/1" do + test "reads 7-bit groups until a byte without the continuation bit" do + assert Parser.decode_mb_uint32(<<0, 9>>) == {:ok, 0, <<9>>} + assert Parser.decode_mb_uint32(<<0x7F>>) == {:ok, 127, <<>>} + assert Parser.decode_mb_uint32(<<0x81, 0>>) == {:ok, 128, <<>>} + assert Parser.decode_mb_uint32(<<0x84, 0x80, 0x01, 0xFF>>) == {:ok, 65537, <<0xFF>>} + end + + test "accumulates in 32 bits and reads at most five bytes" do + assert Parser.decode_mb_uint32(<<0xFF, 0xFF, 0xFF, 0xFF, 0x7F>>) == {:ok, 0xFFFFFFFF, <<>>} + + assert Parser.decode_mb_uint32(<<0x80, 0x80, 0x80, 0x80, 0x80, 0>>) == + {:error, :unvalid_mbuint32} + + assert Parser.decode_mb_uint32(<<0x80, 0x80>>) == {:error, :end_of_buffer} + assert Parser.decode_mb_uint32(<<>>) == {:error, :end_of_buffer} + end + end + + describe "header" do + test "an empty document is a bad parameter (rejected by the converter upstream)" do + assert Parser.parse(<<>>) == {:error, :bad_parameter} + assert Parser.parse(<<>>, %{language: :activesync}) == {:error, :bad_parameter} + end + + test "WBXML 1.0 has no charset field" do + tree = parse!(<<0, 1, 0>> <> @ping_open <> <<3, "x", 0, 1>>) + assert tree.orig_charset == 106 + assert text(tree.root) == "x" + end + + test "the version byte is not validated" do + assert {:ok, _} = + Parser.parse(<<9, 1, 0x6A, 0>> <> @ping_open <> <<1>>, %{language: :activesync}) + end + + test "an unknown charset is rejected" do + assert Parser.parse(<<3, 1, 42, 0>> <> @ping_open <> <<1>>, %{language: :activesync}) == + {:error, :charset_not_found} + end + + test "charset 0 falls back to the option, then UTF-8" do + doc = <<3, 1, 0, 0>> <> @ping_open <> <<3, 0xE9, 0, 1>> + + tree = parse!(doc, %{language: :activesync, charset: 4}) + assert tree.orig_charset == 4 + assert text(tree.root) == "é" + + # Without a fallback the bytes pass through as (invalid) UTF-8, as upstream. + tree = parse!(doc, %{language: :activesync, charset: nil}) + assert tree.orig_charset == 106 + assert text(tree.root) == <<0xE9>> + end + + test "a declared charset is converted (ISO-8859-1, UTF-16)" do + assert parse!(<<3, 1, 4, 0>> <> @ping_open <> <<3, 0xE9, 0, 1>>).root |> text() == "é" + + utf16 = <<3, 1, 0x87, 0x77, 0>> <> @ping_open <> <<3, 0, ?h, 0, ?i, 0, 0, 1>> + tree = parse!(utf16) + assert tree.orig_charset == 1015 + assert text(tree.root) == "hi" + end + + test "a string table longer than the document is rejected" do + assert Parser.parse(<<3, 1, 0x6A, 9, "abc", 0>>, %{language: :activesync}) == + {:error, :strtbl_length} + end + + test "an unreadable string table length is an end of buffer, an unreadable public ID is not" do + assert Parser.parse(<<3, 1, 0x6A, 0x80, 0x80, 0x80, 0x80, 0x80, 1>>, %{ + language: :activesync + }) == + {:error, :end_of_buffer} + + assert Parser.parse(<<3, 0x80, 0x80, 0x80, 0x80, 0x80, 1>>, %{language: :activesync}) == + {:error, :unvalid_mbuint32} + end + end + + describe "public ID" do + # SI 1.0 = 0x05, si = 0x05 + @si_doc <<3, 5, 0x6A, 0, 0x45, 1>> + + test "a known token selects the language" do + tree = parse!(@si_doc, %{language: nil}) + assert tree.lang == :si10 + assert name(tree.root) == {:token, "si"} + end + + test "a string table reference is resolved case-insensitively after the table is read" do + doc = <<3, 0, 0, 0x6A, 28, "-//WAPFORUM//DTD si 1.0//EN", 0, 0x45, 1>> + assert parse!(doc, %{language: nil}).lang == :si10 + end + + test "unknown public IDs" do + assert Parser.parse(<<3, 0x70, 0x6A, 0, 0x45, 1>>, %{language: nil}) == + {:error, :unknown_public_id} + + assert Parser.parse(<<3, 0, 5, 0x6A, 2, "x", 0, 0x45, 1>>, %{language: nil}) == + {:error, :unknown_public_id} + + assert Parser.parse(<<3, 0, 0, 0x6A, 2, "x", 0, 0x45, 1>>, %{language: nil}) == + {:error, :unknown_public_id} + + assert Parser.parse(@anon_header <> @ping_open <> <<1>>, %{language: nil}) == + {:error, :unknown_public_id} + end + + test "a forced language overrides the document's public ID" do + tree = parse!(<<3, 5, 0x6A, 0>> <> @ping_open <> <<3, "x", 0, 1>>, %{language: :activesync}) + assert tree.lang == :activesync + assert name(tree.root) == {:token, "Ping"} + end + + test "an unknown forced language falls back to the document's public ID" do + assert parse!(@si_doc, %{language: :no_such_language}).lang == :si10 + end + end + + describe "string table" do + test "references are NUL-terminated strings at a byte offset" do + tree = parse!(<<3, 1, 0x6A, 3, "abc", 0>> <> <<0x0D, 0x45, 0x83, 1, 1>>) + assert text(tree.root) == "bc" + end + + test "a table that is not NUL-terminated is padded with four NUL bytes" do + # Index 5 points into the padding: an empty string, so no text node. + tree = parse!(<<3, 1, 0x6A, 3, "abc", 0>> <> <<0x0D, 0x45, 0x83, 5, 1>>) + assert tree.root.children == [] + + assert Parser.parse(<<3, 1, 0x6A, 3, "abc", 0>> <> <<0x0D, 0x45, 0x83, 7, 1>>, %{ + language: :activesync + }) == + {:error, :invalid_strtbl_index} + end + + test "without a table, index 0 is the Nokia 'xmlns' work-around and anything else an error" do + assert parse!(@anon_header <> @ping_open <> <<0x83, 0, 1>>).root |> text() == "xmlns" + + assert Parser.parse(@anon_header <> @ping_open <> <<0x83, 1, 1>>, %{language: :activesync}) == + {:error, :null_string_table} + end + end + + describe "elements and code pages" do + test "SWITCH_PAGE in content changes the tag page (Nokia 6600 work-around)" do + # Ping (page 0x0D) containing Status of page 0 (AirSync token 0x0E). + tree = parse!(@anon_header <> @ping_open <> <<0, 0, 0x4E, 3, "s", 0, 1, 1>>) + assert [%Element{name: {:token, %{name: "Status", page: 0}}} = status] = tree.root.children + assert text(status) == "s" + end + + test "SWITCH_PAGE in an attribute list changes the attribute page only" do + # Sync (page 0) with attribute Version="1.1" (page 3, token 5) + "x". + tree = parse!(@anon_header <> <<0xC5, 0, 3, 5, 3, "x", 0, 1, 1>>) + assert name(tree.root) == {:token, "Sync"} + + assert [%Attribute{name: {:token, %{name: "Version", page: 3}}, value: "1.1x"}] = + tree.root.attrs + + assert tree.root.children == [] + end + + test "unknown tag and attribute tokens become literal 'unknown' names" do + tree = parse!(<<3, 1, 0x6A, 0, 0, 0x0D, 0xFF, 5, 3, "v", 0, 1, 3, "x", 0, 1>>) + assert name(tree.root) == {:literal, "unknown"} + assert [%Attribute{name: {:literal, "unknown"}, value: "v"}] = tree.root.attrs + assert text(tree.root) == "x" + end + + test "LITERAL_C, LITERAL_AC and LITERAL attribute names come from the string table" do + tree = parse!(<<3, 1, 0x6A, 4, "foo", 0>> <> @ping_open <> <<0x44, 0, 3, "t", 0, 1, 1>>) + assert [%Element{name: {:literal, "foo"}} = foo] = tree.root.children + assert text(foo) == "t" + + tree = parse!(<<3, 1, 0x6A, 5, "Ping", 0, 0xC4, 0, 4, 0, 3, "v", 0, 1, 3, "t", 0, 1>>) + assert name(tree.root) == {:literal, "Ping"} + assert [%Attribute{name: {:literal, "Ping"}, value: "v"}] = tree.root.attrs + assert text(tree.root) == "t" + end + + test "processing instructions are parsed and dropped, trailing bytes are ignored" do + pi = <<0x43, 4, 0, 3, "v", 0, 1>> + tree = parse!(<<3, 1, 0x6A, 3, "pi", 0>> <> pi <> @ping_open <> <<3, "x", 0, 1>> <> pi) + assert text(tree.root) == "x" + + tree = parse!(@anon_header <> @ping_open <> <<1, 0xFF, 0xFF>>) + assert tree.root.children == [] + end + + test "running out of bytes is an error" do + assert Parser.parse(@anon_header <> @ping_open <> <<3, "x">>, %{language: :activesync}) == + {:error, :charset_str_len} + + assert Parser.parse(@anon_header <> @ping_open, %{language: :activesync}) == + {:error, :end_of_buffer} + + assert Parser.parse(<<3, 1>>, %{language: :activesync}) == {:error, :end_of_buffer} + end + end + + describe "text content" do + test "STR_I, ENTITY and adjacent strings are merged into one text node" do + # ENTITY 0x85 -> C2 85; ENTITY 0 -> nothing; ENTITY 0x41 -> "A". + doc = @anon_header <> @ping_open <> <<2, 0x81, 5, 3, "x", 0, 2, 0, 2, 0x41, 1>> + assert [%Text{data: <<0xC2, 0x85, "xA">>}] = parse!(doc).root.children + end + + test "entity codes >= 0x80000000 are invalid" do + doc = @anon_header <> @ping_open <> <<2, 0x88, 0x80, 0x80, 0x80, 0, 1>> + assert Parser.parse(doc, %{language: :activesync}) == {:error, :invalid_unicode} + end + + test "entity_to_utf8/1 uses the original six-byte UTF-8 scheme" do + assert Parser.entity_to_utf8(0x41) == {:ok, "A"} + assert Parser.entity_to_utf8(0) == {:ok, ""} + assert Parser.entity_to_utf8(0x85) == {:ok, <<0xC2, 0x85>>} + assert Parser.entity_to_utf8(0x20AC) == {:ok, "€"} + # NOTE(upstream-quirk): the loop stops when fewer than 6 bits are left, + # so U+1F600 gets the 3-byte mask and an invalid lead byte. + assert Parser.entity_to_utf8(0x1F600) == {:ok, <<0xFF, 0x98, 0x80>>} + assert Parser.entity_to_utf8(0x7FFFFFFF) == {:ok, <<0xFD, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF>>} + assert Parser.entity_to_utf8(0x80000000) == {:error, :invalid_unicode} + end + + test "whitespace-only text is kept in the tree (the writer decides)" do + assert [%Text{data: " "}] = parse!(@anon_header <> <<0x4D, 3, " ", 0, 1>>).root.children + end + end + + describe "attribute values" do + # SI: si = 0x05, indication = 0x06; attrs created = 0x0A, href="http://www." = 0x0D; + # attr value ".com/" = 0x85. + @si_attrs <<3, 5, 0x6A, 0, 0x45, 0xC6, 0x0A, 0xC3, 4, 0x19, 0x99, 6, 0x25, 0x0D, 3, "xyz", 0, + 0x85, 3, "a&\"\n", 0, 1, 3, "t<>\r", 0, 1, 1>> + + test "are assembled from the start prefix, strings and value tokens" do + tree = parse!(@si_attrs, %{language: nil}) + [%Element{attrs: attrs}] = tree.root.children + + assert [ + %Attribute{name: {:token, %{name: "created"}}, value: "1999-06-25T00:00:00Z"}, + %Attribute{name: {:token, %{name: "href"}}, value: "http://www.xyz.com/a&\"\n"} + ] = attrs + end + + test "unknown attribute value tokens are errors" do + assert Parser.parse(<<3, 5, 0x6A, 0, 0x45, 0xC6, 0x0B, 0x90, 1, 1, 1>>, %{language: nil}) == + {:error, :unknown_attr_value} + + # ActiveSync has no attribute value table at all. + assert Parser.parse(<<3, 1, 0x6A, 0, 0, 0x0D, 0xC5, 5, 0x85, 1, 1>>, %{ + language: :activesync + }) == + {:error, :attr_value_table_undefined} + end + + test "SI created/si-expires and EMN timestamp are OMA datetimes" do + tree = + parse!(<<3, 0x0D, 0x6A, 0, 0x85, 5, 0xC3, 7, 0x20, 2, 4, 0x16, 6, 0x40, 0x12, 1>>, %{ + language: nil + }) + + assert tree.lang == :emn10 + + assert [%Attribute{name: {:token, %{name: "timestamp"}}, value: "2002-04-16T06:40:12Z"}] = + tree.root.attrs + + assert Parser.parse(<<3, 0x0D, 0x6A, 0, 0x85, 5, 0xC3, 3, 0x20, 2, 4, 1>>, %{language: nil}) == + {:error, :bad_datetime} + end + + test "OTA Settings opaque attribute values are base64-encoded" do + # CHARACTERISTIC-LIST > CHARACTERISTIC TYPE="ADDRESS"+opaque(1,2,3) > PARM NAME="n" + doc = <<3, 1, 0x6A, 0, 0x45, 0xC6, 6, 0xC3, 3, 1, 2, 3, 1, 0x87, 0x10, 3, "n", 0, 1, 1, 1>> + tree = parse!(doc, %{language: :ota_settings}) + [%Element{attrs: [%Attribute{value: "ADDRESSAQID"}], children: [parm]}] = tree.root.children + assert [%Attribute{name: {:token, %{name: "NAME"}}, value: "n"}] = parm.attrs + + assert Parser.decode_opaque_attr_value(:ota_settings, <<1, 2, 3>>) == {:ok, "AQID"} + assert Parser.decode_opaque_attr_value(:ota_settings, <<>>) == {:error, :b64_enc} + assert Parser.decode_opaque_attr_value(:si10, <<1, 2, 3>>) == {:ok, <<1, 2, 3>>} + end + end + + describe "extension tokens" do + test "WML variable references" do + # wml (0x3F) > card (0x27): "A", ENTITY 0x85, EXT_I_0 "var", EXT_T_1 -> strtbl[0], EXT_0 ignored + doc = + <<3, 0x0A, 0x6A, 2, "v", 0, 0x7F, 0x67, 3, "A", 0, 2, 0x81, 5, 0x40, "var", 0, 0x81, 0, + 0xC0, 1, 1>> + + tree = parse!(doc, %{language: nil}) + assert tree.lang == :wml13 + [card] = tree.root.children + assert text(card) == <<"A", 0xC2, 0x85, "$(var:escape)$(v:unesc)">> + end + + test "Wireless Village EXT_T_0 carries an extension value token" do + # WV-CSP-Message (0x09) > TransactionContent (0x33): EXT_T_0 0x30 + doc = <<3, 0x10, 0x6A, 0, 0x49, 0x73, 0x80, 0x30, 1, 1>> + [content] = parse!(doc, %{language: nil}).root.children + assert text(content) == "www.wireless-village.org" + + # An unknown value yields no text at all (best-effort mode). + [content] = + parse!(<<3, 0x10, 0x6A, 0, 0x49, 0x73, 0x80, 0x7F, 1, 1>>, %{language: nil}).root.children + + assert content.children == [] + end + + test "extension tokens are skipped in other languages" do + tree = parse!(@anon_header <> @ping_open <> <<0xC0, 3, "x", 0, 1>>) + assert text(tree.root) == "x" + end + end + + describe "opaque content" do + test "Wireless Village integers and datetimes depend on the current tag" do + # Code (0x0B) integer, DateTime (0x11) datetime, Session (0x2D) string + doc = + <<3, 0x10, 0x6A, 0, 0x49, 0x4B, 0xC3, 2, 1, 0, 1, 0x51, 0xC3, 6, 0x1F, 0x49, 0x20, 0x6A, + 0x0C, 0, 1, 0x6D, 0xC3, 2, 1, 0, 1, 1>> + + assert ["256", "20020416T064012Z", <<1, 0>>] = + Enum.map(parse!(doc, %{language: nil}).root.children, &text/1) + + assert Parser.wv_data_type(0, 0x0B) == :integer + assert Parser.wv_data_type(9, 0x0A) == :integer + assert Parser.wv_data_type(6, 0x1A) == :datetime + assert Parser.wv_data_type(0, 0x2D) == :string + + assert Parser.decode_opaque_content(:wv_csp12, %{page: 0, token: 0x11}, <<1, 2, 3>>) == + {:error, :wv_datetime_format} + + assert Parser.decode_opaque_content(:wv_csp11, nil, <<1, 2>>) == {:ok, <<1, 2>>} + end + + test "DRMREL ds:KeyValue and SyncML NextNonce are base64-encoded" do + tree = parse!(<<3, 0x0E, 0x6A, 0, 0x45, 0x4C, 0xC3, 2, 0xFF, 0xFE, 1, 1>>, %{language: nil}) + assert [key_value] = tree.root.children + assert text(key_value) == "//4=" + + # SyncML 1.1 (0xFD3): SyncML > SyncHdr > (page 1) NextNonce + tree = + parse!(<<3, 0x9F, 0x53, 0x6A, 0, 0x6D, 0x6C, 0, 1, 0x50, 0xC3, 3, "abc", 1, 1, 1>>, %{ + language: nil + }) + + [%Element{children: [nonce]}] = tree.root.children + assert text(nonce) == "YWJj" + + assert Parser.decode_opaque_content(:syncml12, %{page: 1, token: 0x10}, <<>>) == + {:error, :b64_enc} + + assert Parser.decode_opaque_content(:syncml12, %{page: 0, token: 0x10}, <<1>>) == + {:ok, <<1>>} + + assert Parser.decode_opaque_content(:activesync, %{page: 0, token: 0x0C}, <<1>>) == + {:ok, <<1>>} + end + + test "ActiveSync binary tags keep the raw bytes in the tree" do + # AirSyncBase (page 0x11) Data (0x0B, :binary) + tree = parse!(@anon_header <> <<0, 0x11, 0x4B, 0xC3, 3, 1, 2, 3, 1>>) + assert name(tree.root) == {:token, "Data"} + assert text(tree.root) == <<1, 2, 3>> + end + + test "a length past the end of the document is rejected" do + assert Parser.parse(@anon_header <> @ping_open <> <<0xC3, 0x10, 1>>, %{ + language: :activesync + }) == + {:error, :bad_opaque_length} + end + end + + describe "SyncML tree building" do + # SyncML 1.1 header, SyncML (0x2D) > SyncBody (0x2B) + @syncml <<3, 0x9F, 0x53, 0x6A, 0, 0x6D, 0x6B>> + @devinf_type "application/vnd.syncml-devinf+wbxml" + # DevInf 1.1 (0xFD4) document: DevInf (0x0A) > VerDTD (0x25) "1.1" + @devinf <<2, 0x9F, 0x54, 0x6A, 0, 0x4A, 0x65, 3, "1.1", 0, 1, 1>> + + defp put_item(data) do + # Put (0x1F) > Item (0x14) > Meta (0x1A) > (page 1) Type (0x13) ... (page 0) Data (0x0F) + @syncml <> + <<0x5F, 0x54, 0x5A, 0, 1, 0x53, 3, @devinf_type, 0, 1, 1, 0, 0, 0x4F>> <> + data <> <<1, 1, 1, 1, 1>> + end + + test "Data announced as an embedded WBXML document becomes a SubTree" do + doc = put_item(<<0xC3, byte_size(@devinf), @devinf::binary>>) + tree = parse!(doc, %{language: nil}) + [%Element{children: [item]}] = tree.root.children |> hd() |> Map.fetch!(:children) + + assert [ + %Element{name: {:token, %{name: "Meta"}}}, + %Element{name: {:token, %{name: "Data"}}} = data + ] = item.children + + assert [%SubTree{tree: %Tree{lang: :devinf11, root: devinf}}] = data.children + assert name(devinf) == {:token, "DevInf"} + assert [%Element{name: {:token, %{name: "VerDTD"}}} = ver] = devinf.children + assert text(ver) == "1.1" + end + + test "Data that does not parse as WBXML stays text" do + doc = put_item(<<0xC3, 2, "zz">>) + + # SyncML > SyncBody > Put/Add > Item > [Meta, Data] + %Element{children: [_meta, data]} = descend(parse!(doc, %{language: nil}).root, 3) + + assert [%Text{data: "zz"}] = data.children + end + + test "vObject Data becomes a CDATA section (Add/Replace hack and Meta Type)" do + # Replace (0x20) > Item > Data "BEGIN:VCARD" + doc = @syncml <> <<0x60, 0x54, 0x4F, 3, "BEGIN:VCARD", 0, 1, 1, 1, 1, 1>> + + %Element{children: [data]} = descend(parse!(doc, %{language: nil}).root, 3) + + assert [%CData{children: [%Text{data: "BEGIN:VCARD"}]}] = data.children + + # Add (0x05) > Item > Meta > Type "text/x-vcard" ... Data: "B" then ENTITY "A" -> two + # characters callbacks, hence upstream's nested CDATA node. + doc = + @syncml <> + <<0x45, 0x54, 0x5A, 0, 1, 0x53, 3, "text/x-vcard", 0, 1, 1, 0, 0, 0x4F, 3, "B", 0, 2, + 0x41, 1, 1, 1, 1, 1>> + + # SyncML > SyncBody > Put/Add > Item > [Meta, Data] + %Element{children: [_meta, data]} = descend(parse!(doc, %{language: nil}).root, 3) + + assert [%CData{children: [%Text{data: "B"}, %CData{children: [%Text{data: "A"}]}]}] = + data.children + end + end +end diff --git a/test/libwbxml/strings_test.exs b/test/libwbxml/strings_test.exs new file mode 100644 index 0000000..79174f0 --- /dev/null +++ b/test/libwbxml/strings_test.exs @@ -0,0 +1,101 @@ +defmodule Libwbxml.Encoder.StringsTest do + use ExUnit.Case, async: true + + alias Libwbxml.Encoder.Strings + + doctest Libwbxml.Encoder.Strings + + # Expected values were produced by the upstream wbxml_buffer_* functions. + + test "blank?/1 is exactly C-locale isspace on bytes" do + for byte <- [?\s, ?\t, ?\n, ?\v, ?\f, ?\r], do: assert(Strings.blank?(byte)) + for byte <- [?a, 0, 0x85, 0xA0, 0xC2], do: refute(Strings.blank?(byte)) + end + + test "only_whitespace?/1" do + assert Strings.only_whitespace?("") + assert Strings.only_whitespace?(" \t\n\v\f\r") + refute Strings.only_whitespace?("a") + refute Strings.only_whitespace?(" a ") + refute Strings.only_whitespace?(<<0xC2, 0xA0>>) + end + + describe "shrink_blanks/1" do + test "reproduces upstream's off-by-one on two-blank runs" do + assert Strings.shrink_blanks("a b") == "a b" + assert Strings.shrink_blanks("a\n\tb") == "a \tb" + assert Strings.shrink_blanks("a \tb") == "a \tb" + assert Strings.shrink_blanks("a\t b") == "a b" + assert Strings.shrink_blanks(" \ta") == " \ta" + assert Strings.shrink_blanks("\t\ta") == " \ta" + assert Strings.shrink_blanks("a\t\t") == "a \t" + end + + test "collapses runs of three or more to one space" do + assert Strings.shrink_blanks("a\n\t\tb") == "a b" + assert Strings.shrink_blanks("\t\t\ta") == " a" + assert Strings.shrink_blanks("a\t\t\t") == "a " + assert Strings.shrink_blanks("a b c") == "a b c" + end + + test "normalises lone blanks to a space and keeps the rest" do + assert Strings.shrink_blanks("\ta") == " a" + assert Strings.shrink_blanks("a\n") == "a " + assert Strings.shrink_blanks("\v") == " " + assert Strings.shrink_blanks("a b") == "a b" + assert Strings.shrink_blanks("") == "" + assert Strings.shrink_blanks(" ") == " " + assert Strings.shrink_blanks("\n\na") == " \na" + end + end + + test "strip_blanks/1" do + assert Strings.strip_blanks(" ") == "" + assert Strings.strip_blanks("") == "" + assert Strings.strip_blanks("a") == "a" + assert Strings.strip_blanks(" a") == "a" + assert Strings.strip_blanks("a ") == "a" + assert Strings.strip_blanks("\v") == "" + end + + test "remove_blanks/1" do + assert Strings.remove_blanks(" a\tb\nc\r\v\f") == "abc" + assert Strings.remove_blanks("") == "" + end + + test "split_words/1" do + assert Strings.split_words("ab cd") == ["ab", "cd"] + assert Strings.split_words("a") == ["a"] + end + + test "hex_to_binary/1 maps non-hex bytes to 0 and drops an odd nibble" do + assert Strings.hex_to_binary("746") == <<0x74>> + assert Strings.hex_to_binary("7G") == <<0x70>> + assert Strings.hex_to_binary("zz") == <<0>> + assert Strings.hex_to_binary("G1") == <<0x01>> + assert Strings.hex_to_binary("0a0A") == <<0x0A, 0x0A>> + assert Strings.hex_to_binary("") == <<>> + end + + test "binary_to_hex/2" do + assert Strings.binary_to_hex("") == "" + assert Strings.binary_to_hex(<<0, 0xFF>>) == "00FF" + assert Strings.binary_to_hex(<<0, 0xFF>>, :lower) == "00ff" + end + + test "remove_trailing_zeros/1" do + assert Strings.remove_trailing_zeros(<<0, 0>>) == <<>> + assert Strings.remove_trailing_zeros(<<>>) == <<>> + assert Strings.remove_trailing_zeros(<<0x74, 0>>) == <<0x74>> + assert Strings.remove_trailing_zeros(<<0, 0x74, 0>>) == <<0, 0x74>> + end + + test "mb_uint32/1" do + assert Strings.mb_uint32(1) == <<0x01>> + assert Strings.mb_uint32(127) == <<0x7F>> + assert Strings.mb_uint32(128) == <<0x81, 0x00>> + assert Strings.mb_uint32(16383) == <<0xFF, 0x7F>> + assert Strings.mb_uint32(16384) == <<0x81, 0x80, 0x00>> + assert Strings.mb_uint32(4_294_967_295) == <<0x8F, 0xFF, 0xFF, 0xFF, 0x7F>> + end +end diff --git a/test/libwbxml/tables_test.exs b/test/libwbxml/tables_test.exs new file mode 100644 index 0000000..ec2c7a3 --- /dev/null +++ b/test/libwbxml/tables_test.exs @@ -0,0 +1,439 @@ +defmodule Libwbxml.TablesTest do + use ExUnit.Case, async: true + + alias Libwbxml.Tables + alias Libwbxml.Tables.Language + + @counts_fixture Path.expand("../fixtures/tables_counts.exs", __DIR__) + + @languages [ + :wml10, + :wml11, + :wml12, + :wml13, + :wta10, + :wtawml12, + :channel11, + :channel12, + :si10, + :sl10, + :co10, + :prov10, + :emn10, + :drmrel10, + :ota_settings, + :syncml10, + :devinf10, + :syncml11, + :devinf11, + :metinf11, + :syncml12, + :devinf12, + :metinf12, + :dmddf12, + :wv_csp11, + :wv_csp12, + :airsync, + :activesync, + :conml + ] + + describe "languages/0 and get/1" do + test "lists the 29 languages of this build in WBXMLLanguage enum order" do + assert Tables.languages() == @languages + end + + test "main_table_order/0 has the same languages in C main-table order" do + order = Tables.main_table_order() + assert Enum.sort(order) == Enum.sort(@languages) + # SyncML 1.2 precedes 1.1 and 1.0 in sv_table_entry[]. + assert Enum.find_index(order, &(&1 == :syncml12)) < + Enum.find_index(order, &(&1 == :syncml11)) + + assert List.first(order) == :wml10 + assert List.last(order) == :conml + end + + test "every language resolves to a Language struct with its own lang" do + for lang <- Tables.languages() do + assert %Language{lang: ^lang, lang_id: id} = Tables.get(lang) + assert is_integer(id) and id > 0 + end + end + + test "unknown languages return nil / raise" do + assert Tables.get(:metinf10) == nil + assert Tables.get(:nope) == nil + assert_raise ArgumentError, fn -> Tables.get!(:nope) end + end + + test "WML 1.0-1.2 share the WML 1.3 tables (WBXML_TABLES_SEPARATE_WML_VERSIONS off)" do + wml13 = Tables.get(:wml13) + + for lang <- [:wml10, :wml11, :wml12] do + t = Tables.get(lang) + assert t.tags == wml13.tags + assert t.attrs == wml13.attrs + assert t.attr_values == wml13.attr_values + assert t.public_id != wml13.public_id + end + end + + test "AirSync and ActiveSync share tags and attrs but not namespaces" do + airsync = Tables.get(:airsync) + activesync = Tables.get(:activesync) + assert airsync.tags == activesync.tags + assert airsync.attrs == activesync.attrs + assert airsync.namespaces != activesync.namespaces + assert hd(airsync.namespaces).uri == "http://synce.org/formats/airsync_wm5/airsync" + assert hd(activesync.namespaces).uri == "AirSync:" + end + end + + describe "table counts" do + test "match the generator's counts fixture" do + {counts, _} = Code.eval_file(@counts_fixture) + assert map_size(counts) == length(@languages) + + for {lang, expected} <- counts do + t = Tables.get(lang) + + actual = %{ + tags: length(t.tags), + namespaces: length(t.namespaces), + attrs: length(t.attrs), + attr_values: length(t.attr_values), + ext_values: length(t.ext_values) + } + + assert actual == expected, "counts for #{lang}" + end + end + + test "reverse maps are consistent with the lists" do + for lang <- Tables.languages() do + t = Tables.get(lang) + + assert Enum.uniq_by(t.tags, &{&1.page, &1.token}) |> length() == + map_size(t.tag_by_token) + + assert t.tag_by_name |> Map.values() |> List.flatten() |> Enum.sort() == + Enum.sort(t.tags) + + assert map_size(t.attr_by_token) == + Enum.uniq_by(t.attrs, &{&1.page, &1.token}) |> length() + + assert map_size(t.attr_value_by_token) == length(t.attr_values) + assert map_size(t.ext_value_by_token) == length(t.ext_values) + assert map_size(t.namespace_by_page) == length(t.namespaces) + assert map_size(t.page_by_namespace) == length(t.namespaces) + end + end + + test "tag code pages form contiguous runs (tag_from_xml relies on it, as C does)" do + for lang <- Tables.languages() do + pages = Tables.get(lang).tags |> Enum.map(& &1.page) |> Enum.dedup() + assert pages == Enum.uniq(pages), "non-contiguous tag pages in #{lang}" + end + end + end + + describe "spot checks against wbxml_tables.c" do + test "ActiveSync Ping is page 0x0D token 0x05" do + t = Tables.get(:activesync) + + assert %{name: "Ping", page: 0x0D, token: 0x05, options: options} = + Tables.tag_from_token(t, 0x0D, 0x05) + + assert options == MapSet.new() + assert Tables.tag_from_xml(t, 0x0D, "Ping").token == 0x05 + end + + test "ActiveSync binary tags carry the :binary option" do + t = Tables.get(:activesync) + assert Tables.tag_from_token(t, 0x0A, 0x1C).name == "Data" + assert Tables.tag_from_token(t, 0x0A, 0x1C).options == MapSet.new([:binary]) + assert Tables.tag_from_token(t, 0x11, 0x1F).name == "Content" + assert Tables.tag_from_token(t, 0x11, 0x1F).options == MapSet.new([:binary]) + assert Tables.tag_from_token(t, 0x0E, 0x0A).options == MapSet.new() + + binary_tags = for tag <- t.tags, :binary in tag.options, do: {tag.page, tag.token} + + assert binary_tags == [ + {0x0A, 0x1C}, + {0x0F, 0x20}, + {0x10, 0x12}, + {0x11, 0x1F}, + {0x14, 0x18}, + {0x15, 0x10}, + {0x16, 0x09}, + {0x16, 0x0A} + ] + end + + test "SI si tag is page 0 token 0x05 and href has value prefixes" do + t = Tables.get(:si10) + assert %{name: "si", page: 0x00, token: 0x05} = Tables.tag_from_token(t, 0, 0x05) + assert %{name: "href", value_prefix: nil, token: 0x0B} = Tables.attr_from_token(t, 0, 0x0B) + + assert %{name: "href", value_prefix: "http://www.", token: 0x0D} = + Tables.attr_from_token(t, 0, 0x0D) + + assert %{name: "action", value_prefix: "signal-high", token: 0x08} = + Tables.attr_from_token(t, 0, 0x08) + end + + test "WML 1.3 href https:// prefix is token 0x4C, shared by WML 1.1" do + for lang <- [:wml13, :wml11] do + t = Tables.get(lang) + + assert %{name: "href", value_prefix: "https://", page: 0x00, token: 0x4C} = + Tables.attr_from_token(t, 0, 0x4C) + + assert %{name: "http-equiv", value_prefix: "Content-Type", token: 0x5B} = + Tables.attr_from_token(t, 0, 0x5B) + end + end + + test "WV-CSP extension values" do + t = Tables.get(:wv_csp12) + assert %{value: "www.wireless-village.org", token: 0x30} = Tables.ext_from_token(t, 0x30) + + assert %{value: "application/vnd.wap.mms-message", token: 0x04} = + Tables.ext_from_xml(t, "application/vnd.wap.mms-message") + + assert Tables.ext_from_token(t, 0xFF) == nil + assert Tables.ext_from_xml(t, "nope") == nil + # First entry is the longest: the table is sorted by length for the encoder. + assert hd(t.ext_values).value == "application/vnd.wap.mms-message" + end + + test "namespaces map to code pages" do + assert Tables.page_for_xmlns(Tables.get(:activesync), "Ping:") == 0x0D + assert Tables.xmlns_for_page(Tables.get(:activesync), 0x0D) == "Ping:" + assert Tables.page_for_xmlns(Tables.get(:syncml11), "syncml:metinf") == 0x01 + assert Tables.xmlns_for_page(Tables.get(:syncml11), 0) == "SYNCML:SYNCML1.1" + assert Tables.page_for_xmlns(Tables.get(:dmddf12), "syncml:dmddf1.2") == 0x02 + assert Tables.xmlns_for_page(Tables.get(:devinf10), 0) == "syncml:devinf" + # C returns 0 for unknown namespaces and for languages without a table. + assert Tables.page_for_xmlns(Tables.get(:activesync), "ping:") == 0 + assert Tables.page_for_xmlns(Tables.get(:si10), "anything") == 0 + assert Tables.xmlns_for_page(Tables.get(:si10), 0) == nil + assert Tables.xmlns_for_page(Tables.get(:activesync), 0x7F) == nil + end + + test "public IDs" do + assert Tables.get(:activesync).public_id == %{ + wbxml_public_id: nil, + xml_public_id: "-//MICROSOFT//DTD ActiveSync//EN", + root_element: "ActiveSync", + dtd: "http://www.microsoft.com/" + } + + assert Tables.get(:ota_settings).public_id == %{ + wbxml_public_id: nil, + xml_public_id: nil, + root_element: "CHARACTERISTIC-LIST", + dtd: "characteristic-list.dtd" + } + + assert Tables.get(:syncml11).public_id.wbxml_public_id == 0x0FD3 + assert Tables.get(:wml13).public_id.wbxml_public_id == 0x0A + assert Tables.get(:conml).public_id.wbxml_public_id == 0x8F + assert Tables.get(:channel11).public_id.dtd == "" + end + + test "wbxml_public_id/1 returns 0x01 for languages without one, like C" do + assert Tables.wbxml_public_id(:syncml11) == 0x0FD3 + assert Tables.wbxml_public_id(:activesync) == 0x01 + assert Tables.wbxml_public_id(:nope) == 0x01 + end + + test "the duplicated AirSync token {0x0E, 0x10} resolves to the first entry" do + t = Tables.get(:airsync) + assert Tables.tag_from_token(t, 0x0E, 0x10).name == "DeviceEncryptionEnabled" + assert Tables.tag_from_xml(t, 0x0E, "RequireStorageCardEncryption").token == 0x10 + end + end + + describe "get_by_wbxml_public_id/1 and get_by_xml_public_id/1" do + test "finds languages by WBXML public ID in main-table order" do + assert %Language{lang: :syncml11} = Tables.get_by_wbxml_public_id(0x0FD3) + assert %Language{lang: :wml13} = Tables.get_by_wbxml_public_id(0x0A) + assert %Language{lang: :wv_csp11} = Tables.get_by_wbxml_public_id(0x10) + assert Tables.get_by_wbxml_public_id(0x01) == nil + assert Tables.get_by_wbxml_public_id(0x7FFF) == nil + end + + test "finds languages by XML public ID case-insensitively" do + assert %Language{lang: :activesync} = + Tables.get_by_xml_public_id("-//microsoft//dtd activesync//en") + + assert %Language{lang: :wv_csp11} = + Tables.get_by_xml_public_id("-//OMA//DTD WV-CSP 1.1//EN") + + assert Tables.get_by_xml_public_id("-//NOPE//EN") == nil + end + end + + describe "search/3" do + test "finds ActiveSync by public ID case-insensitively" do + assert %Language{lang: :activesync} = + Tables.search("-//MICROSOFT//DTD ACTIVESYNC//EN", nil, nil) + + assert %Language{lang: :activesync} = + Tables.search("-//microsoft//dtd activesync//en", "ignored", "ignored") + + assert %Language{lang: :airsync} = Tables.search("-//AIRSYNC//DTD AirSync//EN", nil, nil) + end + + test "falls back to the system ID (exact match) - OTA has no public ID" do + assert %Language{lang: :ota_settings} = Tables.search(nil, "characteristic-list.dtd", nil) + + assert %Language{lang: :ota_settings} = + Tables.search("-//NOT//A//DTD", "characteristic-list.dtd", nil) + + assert Tables.search(nil, "CHARACTERISTIC-LIST.DTD", nil) == nil + + assert %Language{lang: :syncml11} = + Tables.search( + nil, + "http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd", + nil + ) + + # Channel 1.1's DTD is "" in C, so the empty system ID matches it. + assert %Language{lang: :channel11} = Tables.search(nil, "", nil) + end + + test "falls back to the root element: SyncML resolves to 1.2 (first in main table)" do + assert %Language{lang: :syncml12} = Tables.search(nil, nil, "SyncML") + assert %Language{lang: :syncml12} = Tables.search(nil, nil, {nil, "SyncML"}) + assert %Language{lang: :syncml12} = Tables.search(nil, nil, {"", "SyncML"}) + assert %Language{lang: :devinf12} = Tables.search(nil, nil, "DevInf") + assert %Language{lang: :si10} = Tables.search(nil, nil, "si") + assert %Language{lang: :wml10} = Tables.search(nil, nil, "wml") + assert Tables.search(nil, nil, "SYNCML") == nil + assert Tables.search(nil, nil, "nope") == nil + end + + test "a namespaced root (uri|local) is matched against the first namespace entry as a prefix" do + assert %Language{lang: :syncml11} = Tables.search(nil, nil, "SYNCML:SYNCML1.1|SyncML") + assert %Language{lang: :syncml11} = Tables.search(nil, nil, {"syncml:syncml1.1", "SyncML"}) + assert %Language{lang: :syncml10} = Tables.search(nil, nil, "SYNCML:SYNCML1.0|SyncML") + assert %Language{lang: :activesync} = Tables.search(nil, nil, {"AirSync:", "Ping"}) + + assert %Language{lang: :airsync} = + Tables.search(nil, nil, "http://synce.org/formats/airsync_wm5/airsync|Sync") + + assert %Language{lang: :devinf12} = Tables.search(nil, nil, "syncml:devinf|DevInf") + assert %Language{lang: :dmddf12} = Tables.search(nil, nil, "syncml:dmddf1.2|MgmtTree") + # Only the first namespace entry is considered. + assert Tables.search(nil, nil, "syncml:metinf|MetInf") == nil + # With a separator present, the root element scan never matches. + assert Tables.search(nil, nil, "urn:unknown|SyncML") == nil + end + + test "nil everywhere finds nothing" do + assert Tables.search(nil, nil, nil) == nil + end + end + + describe "tag_from_xml/3" do + test "prefers the current code page, then the first entry in table order" do + t = Tables.get(:activesync) + pages = for %{name: "Data"} = e <- t.tags, do: e.page + assert pages == [0x0A, 0x0E, 0x10, 0x11, 0x14] + + assert %{page: 0x11, token: 0x0B} = Tables.tag_from_xml(t, 0x11, "Data") + assert %{page: 0x14, token: 0x0C} = Tables.tag_from_xml(t, 0x14, "Data") + assert %{page: 0x0A, token: 0x1C} = Tables.tag_from_xml(t, nil, "Data") + assert %{page: 0x0A, token: 0x1C} = Tables.tag_from_xml(t, -1, "Data") + # Current page without the tag: first entry in another page. + assert %{page: 0x0A, token: 0x1C} = Tables.tag_from_xml(t, 0x0D, "Data") + assert Tables.tag_from_xml(t, 0, "NoSuchTag") == nil + end + + test "returns nil for languages without a tag table entry" do + assert Tables.tag_from_xml(Tables.get(:sl10), 0, "si") == nil + assert Tables.tag_from_token(Tables.get(:sl10), 0, 0x06) == nil + end + end + + describe "attr_from_xml/3" do + test "picks the longest matching value prefix and returns the remainder" do + t = Tables.get(:sl10) + + assert {%{token: 0x0C, value_prefix: "https://www."}, "example.com/"} = + Tables.attr_from_xml(t, "href", "https://www.example.com/") + + assert {%{token: 0x0B, value_prefix: "https://"}, "example.com/"} = + Tables.attr_from_xml(t, "href", "https://example.com/") + + assert {%{token: 0x0A, value_prefix: "http://www."}, "x"} = + Tables.attr_from_xml(t, "href", "http://www.x") + + assert {%{token: 0x09, value_prefix: "http://"}, "x"} = + Tables.attr_from_xml(t, "href", "http://x") + end + + test "an exact value match leaves nothing to encode" do + t = Tables.get(:sl10) + + assert {%{token: 0x07, value_prefix: "cache"}, nil} = + Tables.attr_from_xml(t, "action", "cache") + + assert {%{token: 0x09, value_prefix: "http://"}, nil} = + Tables.attr_from_xml(t, "href", "http://") + end + + test "falls back to the plain-name entry with the whole value left" do + t = Tables.get(:sl10) + + assert {%{token: 0x08, value_prefix: nil}, "ftp://x"} = + Tables.attr_from_xml(t, "href", "ftp://x") + + assert {%{token: 0x08, value_prefix: nil}, nil} = Tables.attr_from_xml(t, "href", nil) + # No plain-name entry for "action": an unknown value finds nothing. + assert Tables.attr_from_xml(t, "action", "explode") == nil + assert Tables.attr_from_xml(t, "action", nil) == nil + assert Tables.attr_from_xml(t, "nope", "x") == nil + end + + test "a value equal to a prefix but shorter than a later prefix matches exactly" do + t = Tables.get(:si10) + assert {%{token: 0x0C}, nil} = Tables.attr_from_xml(t, "href", "http://") + assert {%{token: 0x0D}, "a"} = Tables.attr_from_xml(t, "href", "http://www.a") + end + + test "languages without an attribute table find nothing" do + assert Tables.attr_from_xml(Tables.get(:syncml11), "href", "x") == nil + end + end + + describe "attribute values" do + test "attr_value_from_token/3 and contains_attr_value?/2" do + t = Tables.get(:sl10) + assert %{value: ".com/", page: 0, token: 0x85} = Tables.attr_value_from_token(t, 0, 0x85) + assert Tables.attr_value_from_token(t, 0, 0x05) == nil + assert Tables.contains_attr_value?(t, "http://example.com/x") + refute Tables.contains_attr_value?(t, "http://example.com") + refute Tables.contains_attr_value?(Tables.get(:syncml11), ".com/") + end + end + + describe "CLI names" do + test "round-trip for every language" do + for lang <- Tables.languages() do + name = Tables.cli_name(lang) + assert is_binary(name) + assert Tables.from_cli_name(name) == lang + end + + assert Tables.from_cli_name("ACTIVESYNC") == :activesync + assert Tables.from_cli_name("CSP11") == :wv_csp11 + assert Tables.from_cli_name("OTA") == :ota_settings + assert Tables.from_cli_name("activesync") == nil + end + end +end diff --git a/test/libwbxml/tree_test.exs b/test/libwbxml/tree_test.exs new file mode 100644 index 0000000..12c0913 --- /dev/null +++ b/test/libwbxml/tree_test.exs @@ -0,0 +1,126 @@ +defmodule Libwbxml.TreeTest do + use ExUnit.Case, async: true + + alias Libwbxml.Tree + alias Libwbxml.Tree.{Attribute, CData, Element, SubTree, Text} + + doctest Libwbxml.Tree + + defp elt(name, children \\ [], attrs \\ []), + do: %Element{name: {:literal, name}, attrs: attrs, children: children} + + defp text(data), do: %Text{data: data} + + test "element_name/1 handles token and literal names for elements and attributes" do + assert Tree.element_name(elt("Sync")) == "Sync" + + assert Tree.element_name(%Element{ + name: {:token, %{name: "Ping", page: 13, token: 5, options: []}} + }) == "Ping" + + assert Tree.element_name(%Attribute{name: {:token, %{name: "href", page: 0, token: 6}}}) == + "href" + + assert Tree.element_name(%Attribute{name: {:literal, "custom"}}) == "custom" + end + + test "has_child_element?/1" do + assert Tree.has_child_element?(elt("a", [text("x"), elt("b")])) + refute Tree.has_child_element?(elt("a", [text("x"), %CData{children: [text("y")]}])) + refute Tree.has_child_element?(elt("a")) + refute Tree.has_child_element?(text("x")) + assert Tree.has_child_element?(%CData{children: [elt("b")]}) + refute Tree.has_child_element?(%SubTree{tree: %Tree{}}) + end + + test "find_element/3 searches siblings and, optionally, descendants" do + inner = elt("Type", [text("t")]) + meta = elt("Meta", [inner]) + nodes = [text("skip"), elt("Other"), meta, elt("Meta", [])] + + assert Tree.find_element(nodes, "Meta") == meta + assert Tree.find_element(nodes, "Type") == nil + assert Tree.find_element(nodes, "Type", true) == inner + assert Tree.find_element([], "Meta") == nil + # depth-first: a match inside an earlier sibling wins over a later sibling + later = elt("Type") + assert Tree.find_element([meta, later], "Type", true) == inner + end + + describe "syncml_data_type/2" do + defp item(type_text, extra \\ []) do + meta = elt("Meta", [elt("Type", [text(type_text)])]) + data = elt("Data", [text("payload")]) + {data, elt("Item", [meta, data] ++ extra)} + end + + test "non-Data elements and non-element nodes are :normal" do + assert Tree.syncml_data_type(elt("Meta"), []) == :normal + assert Tree.syncml_data_type(text("x"), [elt("Data")]) == :normal + assert Tree.syncml_data_type(%SubTree{}, []) == :normal + assert Tree.syncml_data_type(%CData{}, []) == :normal + end + + test "Meta/Type in the parent selects the type" do + for {type, expected} <- [ + {"application/vnd.syncml-devinf+wbxml", :wbxml}, + {"application/vnd.syncml-devinf+xml", :normal}, + {"application/vnd.syncml.dmtnds+wbxml", :wbxml}, + {"application/vnd.syncml.dmtnds+xml", :normal}, + {"text/clear", :clear}, + {"text/directory;profile=vCard", :directory_vcard}, + {"text/x-vcard", :vcard}, + {"text/x-vcalendar", :vcalendar}, + {"text/plain", :normal} + ] do + {data, item} = item(type) + assert Tree.syncml_data_type(data, [item, elt("Results")]) == expected, type + end + end + + test "Meta/Type in the grandparent is used when the parent has none" do + data = elt("Data") + item = elt("Item", [data]) + meta = elt("Meta", [elt("Type", [text("text/x-vcard")])]) + cmd = elt("Replace", [meta, item]) + + assert Tree.syncml_data_type(data, [item, cmd]) == :vcard + end + + test "a parent Meta without Type falls through to the grandparent's Meta" do + data = elt("Data") + item = elt("Item", [elt("Meta", [elt("Format", [text("b64")])]), data]) + cmd = elt("Add", [elt("Meta", [elt("Type", [text("text/x-vcalendar")])]), item]) + + assert Tree.syncml_data_type(data, [item, cmd]) == :vcalendar + end + + test "Type whose first child is not text is ignored" do + data = elt("Data") + item = elt("Item", [elt("Meta", [elt("Type", [elt("X")])]), data]) + + assert Tree.syncml_data_type(data, [item, elt("Add")]) == :vobject + assert Tree.syncml_data_type(data, [item, elt("Results")]) == :normal + end + + test "Data inside an Add/Replace item with no known type is a vObject" do + data = elt("Data", [text("BEGIN:VCARD")]) + item = elt("Item", [data]) + + assert Tree.syncml_data_type(data, [item, elt("Replace")]) == :vobject + assert Tree.syncml_data_type(data, [item, elt("Add")]) == :vobject + assert Tree.syncml_data_type(data, [item, elt("Delete")]) == :normal + assert Tree.syncml_data_type(data, [item]) == :normal + assert Tree.syncml_data_type(data, []) == :normal + end + + test "a CDATA node is checked through its parent element" do + cdata = %CData{children: [text("BEGIN:VCARD")]} + data = elt("Data", [cdata]) + item = elt("Item", [data]) + + assert Tree.syncml_data_type(cdata, [data, item, elt("Replace")]) == :vobject + assert Tree.syncml_data_type(cdata, [data, item, elt("Sync")]) == :normal + end + end +end diff --git a/test/libwbxml/xml/reader_test.exs b/test/libwbxml/xml/reader_test.exs new file mode 100644 index 0000000..fcbf569 --- /dev/null +++ b/test/libwbxml/xml/reader_test.exs @@ -0,0 +1,365 @@ +defmodule Libwbxml.XML.ReaderTest do + use ExUnit.Case, async: true + + alias Libwbxml.{Charset, Tables, Tree} + alias Libwbxml.TestFixtures, as: Fixtures + alias Libwbxml.Tree.{Attribute, CData, Element, SubTree, Text} + alias Libwbxml.XML.Reader + + @si_doctype ~s() + @as_doctype ~s() + @syncml11_doctype ~s() + @syncml12_doctype ~s() + + defp read!(xml, opts \\ %{}) do + assert {:ok, %Tree{} = tree} = Reader.read(xml, opts) + tree + end + + defp token_name({:token, %{name: name}}), do: name + + describe "every upstream fixture" do + for {key, entry} <- Fixtures.entries() do + @tag fixture: key + test "#{key} reads as #{inspect(entry.language)}" do + xml = File.read!(unquote(Fixtures.input_path(entry))) + assert {:ok, %Tree{lang: lang, root: %Element{}}} = Reader.read(xml) + assert lang == unquote(entry.language) + end + end + end + + describe "language detection" do + test "from the DOCTYPE public identifier, case-insensitively" do + assert read!(@si_doctype <> "").lang == :si10 + assert read!(~s()).lang == :si10 + end + + test "from the DOCTYPE system identifier when the public one is unknown" do + xml = + ~s() + + assert read!(xml).lang == :ota_settings + end + + test "from the root element name without a DOCTYPE" do + assert read!("").lang == :si10 + assert read!("").lang == :syncml11 + assert read!("").lang == :syncml12 + end + + test "the DOCTYPE wins over the root element" do + assert read!(@si_doctype <> "").lang == :si10 + end + + test "unknown DOCTYPE and root" do + xml = ~s() + assert Reader.read(xml) == {:error, :unknown_xml_language} + assert Reader.read("") == {:error, :unknown_xml_language} + end + + test "a forced language skips detection" do + tree = + read!(~s(), %{ + language: :activesync + }) + + assert tree.lang == :activesync + + assert %Element{name: {:literal, "Foo"}, children: [%Element{name: {:literal, "Bar"}}]} = + tree.root + + tree = read!(@si_doctype <> "", %{language: :sl10}) + assert tree.lang == :sl10 + end + end + + describe "names" do + test "elements are tokenised in the code page of their namespace" do + tree = + read!(@as_doctype <> ~s(12)) + + assert {:token, %{name: "Ping", page: 0x0D, token: 0x05}} = tree.root.name + + assert [ + %Element{name: {:token, %{name: "Status", page: 0x0D}}}, + %Element{name: {:literal, "Bogus"}} + ] = tree.root.children + end + + test "an unknown namespace means code page 0" do + tree = read!(@as_doctype <> ~s(1)) + assert {:token, %{name: "Ping", page: 0x0D}} = tree.root.name + assert [%Element{name: {:token, %{name: "Status", page: 0x00}}}] = tree.root.children + end + + test "an element name shared by several code pages follows its namespace" do + tree = + read!( + @as_doctype <> + ~s(sc) + ) + + [ + %Element{ + children: [ + %Element{ + children: [%Element{children: [%Element{children: [%Element{children: subjects}]}]}] + } + ] + } + ] = tree.root.children + + assert [{:token, %{page: 2}}, {:token, %{page: 4}}] = Enum.map(subjects, & &1.name) + end + + test "xmlns attributes are dropped and other attributes are resolved with their value" do + tree = + read!( + @si_doctype <> + ~s(t) + ) + + [%Element{attrs: attrs}] = tree.root.children + + assert [ + %Attribute{ + name: {:token, %{name: "href", value_prefix: "http://"}}, + value: "http://x/y" + }, + %Attribute{name: {:literal, "urn:p|z"}, value: "1"}, + %Attribute{name: {:literal, "bogus"}, value: "b"} + ] = attrs + end + + test "namespace prefixes are lost, as with expat: is the literal 'rights'" do + xml = + ~s() + + tree = read!(xml) + assert tree.lang == :drmrel10 + assert {:literal, "rights"} = tree.root.name + assert [%Element{name: {:literal, "context"}}] = tree.root.children + end + end + + describe "text" do + test "runs of text are one node, entities and comments included" do + tree = read!(@si_doctype <> "a&b") + assert [%Element{children: [%Text{data: "a&bdé"}]}] = tree.root.children + end + + test "whitespace-only text is kept in the tree" do + tree = read!(@si_doctype <> "\n \n") + + assert [%Text{data: "\n "}, %Element{children: [%Text{data: " "}]}, %Text{data: "\n"}] = + tree.root.children + end + + test "non-ASCII text arrives as UTF-8 whatever the declared encoding" do + utf8 = + read!( + ~s() <> + @si_doctype <> "café €" + ) + + assert [%Element{children: [%Text{data: "café €"}]}] = utf8.root.children + assert utf8.orig_charset == Charset.utf_8() + + latin1 = + read!( + ~s() <> + @si_doctype <> "caf\xE9" + ) + + assert [%Element{children: [%Text{data: "café"}]}] = latin1.root.children + assert latin1.orig_charset == Charset.iso_8859_1() + + assert read!(@si_doctype <> "").orig_charset == nil + end + + test "CDATA sections and processing instructions" do + tree = read!(@si_doctype <> "]]>t") + + assert [%Element{children: [%CData{children: [%Text{data: ""}]}, %Text{data: "t"}]}] = + tree.root.children + end + end + + describe "binary tags (ActiveSync)" do + @sync_open ~s() + @sync_close "" + + defp application_data(%Tree{root: root}) do + [ + %Element{ + children: [%Element{children: [%Element{children: [%Element{children: [app]}]}]}] + } + ] = root.children + + app + end + + test "base64 text is decoded into one text node, whitespace included" do + tree = + read!( + @as_doctype <> + @sync_open <> + ~s(\n AQ\n ID\n) <> @sync_close + ) + + %Element{children: [%Element{name: name, children: children}]} = application_data(tree) + assert token_name(name) == "ConversationId" + assert [%Text{data: <<1, 2, 3>>}] = children + end + + test "undecodable base64 is an error" do + xml = + @as_doctype <> + @sync_open <> ~s(!!) <> @sync_close + + assert Reader.read(xml) == {:error, :b64_dec} + end + + test "an empty binary tag has no content" do + tree = + read!(@as_doctype <> @sync_open <> ~s() <> @sync_close) + + assert %Element{children: [%Element{children: []}]} = application_data(tree) + end + end + + describe "SyncML data" do + defp data_element(%Tree{root: root}) do + Tree.find_element(root.children, "Data", true) + end + + test "vObject data gets CRLF line ends inside an implicit CDATA section" do + xml = + @syncml11_doctype <> + ~s(1text/x-vcardBEGIN:VCARD\nN:x\r\nEND:VCARD) + + assert %Element{ + children: [%CData{children: [%Text{data: "BEGIN:VCARD\r\nN:x\r\nEND:VCARD"}]}] + } = data_element(read!(xml)) + end + + test "any in an or item is treated as a vObject" do + xml = + @syncml11_doctype <> + ~s(a\nb) + + assert %Element{children: [%CData{children: [%Text{data: "a\r\nb"}]}]} = + data_element(read!(xml)) + + xml = + @syncml11_doctype <> + ~s(a\nb) + + assert %Element{children: [%Text{data: "a\nb"}]} = data_element(read!(xml)) + end + + test "text/clear data is wrapped in a CDATA section without CRLF conversion" do + xml = + @syncml11_doctype <> + ~s(text/cleara\nb) + + assert %Element{children: [%CData{children: [%Text{data: "a\nb"}]}]} = + data_element(read!(xml)) + end + + test "text after an explicit CDATA section is not wrapped again" do + xml = + @syncml11_doctype <> + ~s(\n) + + assert %Element{children: [%CData{children: [%Text{data: "x\r\ny"}]}, %Text{data: "\r\n"}]} = + data_element(read!(xml)) + end + + test "an embedded DevInf document becomes a SubTree using the matching DevInf tables" do + xml = + @syncml11_doctype <> + ~s(\nAcme\n) + + assert %Element{children: [%Text{data: "\n"}, %SubTree{tree: sub}, %Text{data: "\n"}]} = + data_element(read!(xml)) + + assert %Tree{lang: :devinf11, orig_charset: nil, root: root} = sub + assert {:token, %{name: "DevInf", page: 0}} = root.name + + assert [%Element{name: {:token, %{name: "Man"}}, children: [%Text{data: "Acme"}]}] = + root.children + + xml12 = String.replace(xml, @syncml11_doctype, @syncml12_doctype) + + assert %Element{children: [_, %SubTree{tree: %Tree{lang: :devinf12}}, _]} = + data_element(read!(xml12)) + end + + test "an embedded MgmtTree requires SyncML 1.2" do + body = + ~s(1.2) + + assert %Element{children: [%SubTree{tree: %Tree{lang: :dmddf12}}]} = + data_element(read!(@syncml12_doctype <> body)) + + assert Reader.read(@syncml11_doctype <> body) == {:error, :unknown_xml_language} + end + + test "a root DevInf document is not embedded" do + xml = + ~s(Acme) + + tree = read!(xml) + assert tree.lang == :devinf11 + assert [%Element{}] = tree.root.children + end + end + + describe "errors" do + test "malformed XML" do + assert Reader.read("not xml") == {:error, :xml_parsing_failed} + assert Reader.read("<") == {:error, :xml_parsing_failed} + assert Reader.read("") == {:error, :xml_parsing_failed} + assert Reader.read(" ") == {:error, :xml_parsing_failed} + assert Reader.read(@si_doctype <> " ") == {:error, :xml_parsing_failed} + assert Reader.read(<<"", 0xFF, 0xFE, "">>) == {:error, :xml_parsing_failed} + assert Reader.read("") == {:error, :xml_parsing_failed} + assert Reader.read("junk") == {:error, :xml_parsing_failed} + end + + test "entities declared in the internal subset are expanded" do + assert {:ok, %Tree{root: %Element{children: [%Text{data: "\u00A0"}]}}} = + Reader.read(~s(]> )) + end + + test "trailing whitespace and comments are fine" do + assert {:ok, _} = Reader.read("\n\n") + end + + test "empty input" do + assert Reader.read("") == {:error, :bad_parameter} + end + + test "a syntax error wins over an earlier language error, as in C" do + assert Reader.read("") == {:error, :xml_parsing_failed} + end + + test "random bytes and deep nesting never raise" do + for _ <- 1..20 do + assert {:error, _} = Reader.read(:crypto.strong_rand_bytes(64)) + end + + deep = String.duplicate("", 2000) <> String.duplicate("", 2000) + assert {:ok, %Tree{}} = Reader.read(@as_doctype <> deep) + end + end + + test "tables are consistent with the tree's language" do + tree = read!(@as_doctype <> ~s(1)) + lang = Tables.get(tree.lang) + [%Element{name: {:token, entry}}] = tree.root.children + assert Tables.tag_from_token(lang, entry.page, entry.token) == entry + end +end diff --git a/test/libwbxml/xml/writer_test.exs b/test/libwbxml/xml/writer_test.exs new file mode 100644 index 0000000..7258f96 --- /dev/null +++ b/test/libwbxml/xml/writer_test.exs @@ -0,0 +1,274 @@ +defmodule Libwbxml.XML.WriterTest do + use ExUnit.Case, async: true + + alias Libwbxml.{Parser, Tables, Tree} + alias Libwbxml.Tree.{Attribute, CData, Element, PI, SubTree, Text} + alias Libwbxml.XML.Writer + + doctest Libwbxml.XML.Writer + + # Every expected document below was produced by `wbxml2xml` (libwbxml + # 0.11.10) from the equivalent WBXML; see the vectors in the task report. + + @as_doctype ~s() + @si_doctype ~s() + @syncml_doctype ~s() + + defp tag(lang, name, page \\ nil) do + {:token, Tables.tag_from_xml(Tables.get(lang), page, name) || raise("no tag #{name}")} + end + + defp attr(lang, name, value) do + {entry, _left} = Tables.attr_from_xml(Tables.get(lang), name, nil) + %Attribute{name: {:token, entry}, value: value} + end + + defp el(name, children), do: %Element{name: name, children: children} + defp el(name, attrs, children), do: %Element{name: name, attrs: attrs, children: children} + defp text(data), do: %Text{data: data} + + defp tree(lang, root), do: %Tree{lang: lang, orig_charset: 106, root: root} + + defp write!(tree, opts \\ %{}) do + assert {:ok, xml} = Writer.write(tree, opts) + xml + end + + # ActiveSync children + defp ping(children), do: tree(:activesync, el(tag(:activesync, "Ping", 0x0D), children)) + + describe "header and DOCTYPE" do + test "PUBLIC form with newlines in indent format only" do + doc = tree(:si10, el(tag(:si10, "si"), [])) + + assert write!(doc) == ~s(\n#{@si_doctype}\n\n) + assert write!(doc, %{format: :compact}) == ~s(#{@si_doctype}) + assert write!(doc, %{format: :canonical}) == ~s(#{@si_doctype}) + end + + test "SYSTEM form for a language without an XML public ID (OTA Settings)" do + doc = tree(:ota_settings, el(tag(:ota_settings, "CHARACTERISTIC-LIST"), [])) + + assert write!(doc) == + ~s(\n\n\n) + end + + test "a tree without a language or root cannot be written" do + root = el({:literal, "x"}, []) + assert Writer.write(%Tree{lang: nil, root: root}) == {:error, :lang_table_undefined} + assert Writer.write(%Tree{lang: :nope, root: root}) == {:error, :lang_table_undefined} + assert Writer.write(%Tree{lang: :si10, root: nil}) == {:error, :bad_parameter} + end + end + + describe "elements and namespaces" do + test "xmlns is written for the root and on every code page change" do + # Ping (page 0x0D) > Status (page 0) + doc = ping([el(tag(:activesync, "Status", 0), [text("s")])]) + + assert write!(doc) == + ~s(\n#{@as_doctype}\n\ns\n\n) + end + + test "literal elements get no namespace, except a literal root (upstream quirk)" do + assert write!(ping([el({:literal, "foo"}, [text("t")])])) =~ + ~s(\nt\n) + + # NOTE(upstream-quirk): the code page of a literal root is its name length. + literal_root = fn name -> tree(:activesync, el({:literal, name}, [])) end + assert write!(literal_root.("unknown")) =~ ~s() + assert write!(literal_root.("Ping")) =~ ~s() + assert write!(literal_root.("x")) =~ ~s() + # Page 0x20 has no namespace in ActiveSync. + assert write!(literal_root.(String.duplicate("a", 32))) =~ + ~s(<#{String.duplicate("a", 32)}/>) + end + + test "languages without a namespace table never write xmlns" do + assert write!(tree(:si10, el(tag(:si10, "si"), []))) =~ "" + end + + test "empty elements are self-closing, others get an end tag" do + doc = ping([el(tag(:activesync, "Status", 0x0D), [])]) + assert write!(doc) =~ ~s(\n\n\n) + end + + test "attributes are escaped, and dropped for languages without an attribute table" do + si = + tree( + :si10, + el(tag(:si10, "si"), [ + el(tag(:si10, "indication"), [attr(:si10, "href", ~s(a&"<>'\n))], []) + ]) + ) + + assert write!(si, %{format: :compact}) =~ + ~s() + + assert write!(si, %{format: :canonical}) =~ + ~s() + + conml = + tree(:conml, el(tag(:conml, "All"), [%Attribute{name: {:literal, "a"}, value: "v"}], [])) + + assert write!(conml) == + ~s(\n\n\n) + end + end + + describe "text" do + test "special characters are escaped; canonical format also normalises line ends and tabs" do + doc = ping([text("t<>&'\"\r\n\t")]) + + assert write!(doc, %{format: :compact}) =~ + ~s(t<>&'") + + assert write!(doc, %{format: :canonical}) =~ + ~s(t<>&'" ) + end + + test "escape/2 returns the input unchanged when nothing needs escaping" do + assert Writer.escape("plain", false) == "plain" + assert IO.iodata_to_binary(Writer.escape("a\tb", false)) == "a\tb" + assert IO.iodata_to_binary(Writer.escape("a\tb", true)) == "a b" + end + + test "whitespace-only text is dropped and blanks are stripped unless preserved or canonical" do + ws = tree(:activesync, el(tag(:activesync, "ServerId", 0), [text(" ")])) + assert write!(ws) =~ ~s(\n) + assert write!(ws, %{format: :compact}) =~ ~s() + assert write!(ws, %{format: :canonical}) =~ ~s( ) + + assert write!(ws, %{preserve_whitespace: true}) =~ + ~s( \n) + + mixed = + tree( + :activesync, + el(tag(:activesync, "ServerId", 0), [ + text(" a "), + el(tag(:activesync, "Status", 0), [text(" b ")]) + ]) + ) + + assert write!(mixed) =~ ~s(\nab\n\n) + + assert write!(mixed, %{preserve_whitespace: true}) =~ + ~s(\n a b \n\n) + end + + test "text followed by an empty element reproduces upstream's in_content newline" do + doc = ping([text("text"), el(tag(:activesync, "Status", 0x0D), [])]) + assert write!(doc) =~ ~s(\ntext\n\n\n) + assert write!(doc, %{indent: 2}) =~ ~s(\ntext \n\n\n) + assert write!(doc, %{format: :compact}) =~ ~s(text) + end + + test "indent delta applies per nesting level, only to elements with element children" do + doc = + ping([ + el(tag(:activesync, "Folders", 0x0D), [ + el(tag(:activesync, "Folder", 0x0D), [text("f")]) + ]) + ]) + + assert write!(doc, %{indent: 2}) =~ + ~s(\n \n f\n \n\n) + + # The delta is ignored outside the indent format. + assert write!(doc, %{format: :compact, indent: 2}) =~ + ~s(f) + end + + test "binary tags are base64-encoded, even when their content is blank" do + # AirSyncBase (page 0x11) Content is a :binary tag; Data of the same page is not. + content = tag(:activesync, "Content", 0x11) + data = tag(:activesync, "Data", 0x11) + + assert write!(tree(:activesync, el(content, [text(<<1, 2, 3>>)]))) =~ + ~s(AQID) + + assert write!(tree(:activesync, el(content, [text(" ")]))) =~ + ~s(IA==) + + assert Writer.write(tree(:activesync, el(content, [text("")]))) == {:error, :b64_enc} + + assert write!(tree(:activesync, el(data, [text(<<1, 2, 3>>)]))) =~ + ~s() <> <<1, 2, 3>> <> "" + end + + test "SyncML announcing embedded WBXML is rewritten to the XML type" do + type = fn lang, value -> tree(lang, el(tag(lang, "Type", 1), [text(value)])) end + + assert write!(type.(:syncml11, "application/vnd.syncml-devinf+wbxml"), %{format: :compact}) =~ + ~s(application/vnd.syncml-devinf+xml) + + assert write!(type.(:syncml12, "application/vnd.syncml.dmtnds+wbxml"), %{format: :compact}) =~ + ~s(application/vnd.syncml.dmtnds+xml) + + assert write!(type.(:syncml11, "application/vnd.syncml.dmtnds+wbxml"), %{format: :compact}) =~ + ~s(application/vnd.syncml.dmtnds+wbxml) + + assert write!(type.(:syncml11, "text/x-vcard"), %{format: :compact}) =~ + ~s(text/x-vcard) + end + end + + describe "CDATA, sub-trees and other nodes" do + test "CDATA sections are written verbatim" do + data = el(tag(:syncml11, "Data", 0), [%CData{children: [text("a) + + nested = + el(tag(:syncml11, "Data", 0), [ + %CData{children: [text("B"), %CData{children: [text("A")]}]} + ]) + + assert write!(tree(:syncml11, nested)) =~ + ~s(]]>\n) + end + + test "embedded documents are written inline without header at the current indentation" do + devinf = + tree( + :devinf11, + el(tag(:devinf11, "DevInf"), [el(tag(:devinf11, "VerDTD"), [text("1.1")])]) + ) + + doc = + tree( + :syncml11, + el(tag(:syncml11, "SyncML"), [el(tag(:syncml11, "Data", 0), [%SubTree{tree: devinf}])]) + ) + + assert write!(doc) == + ~s(\n#{@syncml_doctype}\n\n) <> + ~s(\n1.1\n\n\n\n) + + assert write!(doc, %{indent: 2}) =~ + ~s(\n \n 1.1\n \n\n\n) + + assert Writer.write( + tree(:syncml11, el(tag(:syncml11, "SyncML"), [%SubTree{tree: %Tree{lang: nil}}])) + ) == + {:error, :bad_parameter} + end + + test "processing instructions and unknown nodes are rejected" do + assert Writer.write(ping([%PI{target: "x", data: "y"}])) == {:error, :not_implemented} + assert Writer.write(ping([:bogus])) == {:error, :xml_node_not_allowed} + end + end + + describe "end to end" do + test "a parsed ActiveSync document renders as wbxml2xml does" do + wbxml = <<3, 1, 0x6A, 0, 0, 0x0D, 0x45, 0x47, 3, "1", 0, 1, 1>> + {:ok, tree} = Parser.parse(wbxml, %{language: :activesync}) + + assert write!(tree, %{format: :indent, indent: 0}) == + ~s(\n#{@as_doctype}\n\n1\n\n) + end + end +end diff --git a/test/libwbxml_roundtrip_test.exs b/test/libwbxml_roundtrip_test.exs index 031bc2e..c588e0e 100644 --- a/test/libwbxml_roundtrip_test.exs +++ b/test/libwbxml_roundtrip_test.exs @@ -4,13 +4,7 @@ defmodule LibwbxmlRoundtripTest do @fixture Path.expand("fixtures/sync_initial_no_events.xml", __DIR__) setup_all do - build_path = Mix.Project.build_path() - priv_dir = Path.join(build_path, "lib/libwbxml/priv/") - Application.put_env(:libwbxml, :libwbxml_dir, priv_dir) - Libwbxml.load_nif() - - xml = File.read!(@fixture) - {:ok, xml: xml} + {:ok, xml: File.read!(@fixture)} end defp valid_string?(string) do @@ -50,9 +44,9 @@ defmodule LibwbxmlRoundtripTest do assert is_binary(wbxml) and byte_size(wbxml) > 0 {:ok, decoded} = Libwbxml.decode(wbxml) - decoded_str = to_string(decoded) + assert is_binary(decoded) - assert valid_string?(decoded_str) - assert well_formed_tags?(decoded_str) + assert valid_string?(decoded) + assert well_formed_tags?(decoded) end end diff --git a/test/libwbxml_test.exs b/test/libwbxml_test.exs index 0517ffb..994e1fc 100644 --- a/test/libwbxml_test.exs +++ b/test/libwbxml_test.exs @@ -4,16 +4,7 @@ defmodule LibwbxmlTest do @xml_fixture Path.expand("fixtures/ping_status_1.xml", __DIR__) setup_all do - build_path = Mix.Project.build_path() - - # Point the Libwbxml module to the freshly-built NIF and force (re)load. - priv_dir = Path.join(build_path, "lib/libwbxml/priv/") - Application.put_env(:libwbxml, :libwbxml_dir, priv_dir) - Libwbxml.load_nif() - - xml = File.read!(@xml_fixture) - - {:ok, xml: xml} + {:ok, xml: File.read!(@xml_fixture)} end describe "encode/1" do @@ -29,17 +20,17 @@ defmodule LibwbxmlTest do {:ok, wbxml} = Libwbxml.encode(xml) assert {:ok, decoded_xml} = Libwbxml.decode(wbxml) - decoded_str = to_string(decoded_xml) - - assert decoded_str =~ "1" + assert is_binary(decoded_xml) + assert decoded_xml =~ "1" end end # Additional error-handling coverage describe "decode/1 error handling" do - test "returns error for invalid data" do - assert {:error, _} = Libwbxml.decode(<<1, 2, 3, 4>>) + test "returns an error reason atom for invalid data" do + assert {:error, reason} = Libwbxml.decode(<<1, 2, 3, 4>>) + assert reason in Libwbxml.Error.reasons() end end end diff --git a/test/support/fixtures.ex b/test/support/fixtures.ex new file mode 100644 index 0000000..4e8193f --- /dev/null +++ b/test/support/fixtures.ex @@ -0,0 +1,65 @@ +defmodule Libwbxml.TestFixtures do + @moduledoc """ + Access to the vendored upstream fixtures and their goldens. + + The manifest (`test/fixtures/upstream/manifest.exs`) was generated once + from the upstream C reference tools and is frozen; its header documents the + golden naming scheme. + """ + + @root Path.expand("../..", __DIR__) + @manifest_path Path.join(@root, "test/fixtures/upstream/manifest.exs") + + @doc "Repository root." + def root, do: @root + + @doc "The manifest as a map of `\"dir/name.xml\" => %{...}`, keys sorted." + def manifest do + {manifest, _} = Code.eval_file(@manifest_path) + manifest + end + + @doc "Manifest entries as a sorted list of `{key, entry}`." + def entries, do: manifest() |> Enum.sort_by(&elem(&1, 0)) + + @doc "Absolute path of the fixture input named by a manifest entry." + def input_path(%{path: path}), do: Path.join(@root, path) + + @doc """ + Absolute path of a golden variant for a manifest entry. + + `variant` is one of `:wbxml`, `:nostrtbl`, `:anon`, `:wbxml_xml`, + `:anon_wbxml_xml`, `:compact`, `:canonical`, `:indent2`. + """ + def golden_path(%{path: path}, variant) do + base = Path.join(@root, path) + stem = Path.rootname(base) + + suffix = + case variant do + :wbxml -> ".wbxml" + :nostrtbl -> ".nostrtbl.wbxml" + :anon -> ".anon.wbxml" + :wbxml_xml -> ".wbxml.xml" + :anon_wbxml_xml -> ".anon.wbxml.xml" + :compact -> ".wbxml.compact.xml" + :canonical -> ".wbxml.canonical.xml" + :indent2 -> ".wbxml.indent2.xml" + end + + stem <> suffix + end + + @doc "Upstream test directory of a manifest key (`\"si\"`), or `nil` for project fixtures." + def dir(key) do + case Path.split(key) do + [dir, _file] -> dir + [_file] -> nil + end + end + + @doc "Paths of the fuzz reproducer inputs." + def fuzz_inputs do + Path.join(@root, "test/fixtures/fuzz/*.fuzz") |> Path.wildcard() |> Enum.sort() + end +end diff --git a/test/support/golden_diff.ex b/test/support/golden_diff.ex new file mode 100644 index 0000000..9536238 --- /dev/null +++ b/test/support/golden_diff.ex @@ -0,0 +1,78 @@ +defmodule Libwbxml.GoldenDiff do + @moduledoc """ + Byte-exact comparison helpers for the golden tests + (`test/upstream/golden_test.exs`). + + `explain/3` renders the first differing byte offset plus a hex and a + printable excerpt of both sides around it, which is far more useful than + ExUnit's default diff when the operands are multi-kilobyte binaries. + """ + + @context 16 + + @doc "Offset of the first byte where `a` and `b` differ, or `:equal`." + @spec first_mismatch(binary(), binary()) :: non_neg_integer() | :equal + def first_mismatch(a, b) when is_binary(a) and is_binary(b), do: first_mismatch(a, b, 0) + + defp first_mismatch(<>, <>, i), do: first_mismatch(ra, rb, i + 1) + defp first_mismatch(<<>>, <<>>, _i), do: :equal + defp first_mismatch(_, _, i), do: i + + @doc """ + Human-readable explanation of how `actual` differs from `expected`. + + Returns `nil` when they are byte-identical. `label` names the golden file. + """ + @spec explain(String.t(), binary(), binary()) :: String.t() | nil + def explain(label, expected, actual) when is_binary(expected) and is_binary(actual) do + case first_mismatch(expected, actual) do + :equal -> + nil + + offset -> + """ + golden mismatch: #{label} + expected #{byte_size(expected)} bytes, got #{byte_size(actual)} bytes + first difference at byte offset #{offset} (0x#{Integer.to_string(offset, 16)}) + expected: #{excerpt(expected, offset)} + actual: #{excerpt(actual, offset)} + """ + end + end + + def explain(label, expected, actual) do + "golden mismatch: #{label}\n expected a binary, got: #{inspect(actual, limit: 40)}" <> + if(is_binary(expected), do: "", else: "\n (expected is not a binary either)") + end + + @doc "Hex + printable excerpt of `bin` around `offset` (`#{@context}` bytes each side)." + @spec excerpt(binary(), non_neg_integer()) :: String.t() + def excerpt(bin, offset) do + start = max(offset - @context, 0) + len = min(byte_size(bin) - start, 2 * @context + 1) + + if len <= 0 do + "" + else + slice = binary_part(bin, start, len) + marker = offset - start + + hex = + slice + |> :binary.bin_to_list() + |> Enum.with_index() + |> Enum.map_join(" ", fn {byte, i} -> + h = byte |> Integer.to_string(16) |> String.pad_leading(2, "0") + if i == marker, do: "[#{h}]", else: h + end) + + "@#{start}: #{hex} |#{printable(slice)}|" + end + end + + defp printable(bin) do + for <>, into: "" do + if byte in 0x20..0x7E, do: <>, else: "." + end + end +end diff --git a/test/support/normalize.ex b/test/support/normalize.ex new file mode 100644 index 0000000..d954ea7 --- /dev/null +++ b/test/support/normalize.ex @@ -0,0 +1,570 @@ +defmodule Libwbxml.TestNormalize do + @moduledoc """ + Port of upstream `test/tools/normalize_xml.pl` (libwbxml 0.11.10), the + script that defines "equal" for the upstream round-trip test suite, plus + `diff -b` style comparison helpers. + + The Perl script is not an XML parser: it is a line-oriented prologue + handler followed by a byte-oriented state machine with regex helpers. This + module reproduces it rule for rule, including its quirks, so that the + Elixir round-trip test accepts exactly what upstream accepts. Both the + original document and the decoded one are normalised the same way, so the + quirks never affect a comparison, but the port is kept byte-exact with the + Perl output so it can be cross-checked (see `test/upstream/normalize_test.exs`). + + Rules reproduced (numbers refer to sections of the Perl script): + + Prologue (line oriented, until the first line matching `^\\s*<[a-zA-Z]`): + * an XML declaration gets `encoding="UTF-8"` appended when it has no + `encoding`, and the encoding value is upper-cased (ASCII only). Quirk: + the value is extracted with a regex that keeps the line's trailing + newline, so the output is `encoding="UTF-8\\n"?>` -- a newline inside + the quotes. Reproduced. + * a `` has its first ` []` internal subset removed; + multi-line declarations, DOCTYPEs and comments are joined into one + line with every newline run (plus surrounding blanks) replaced by one + space. + * comments and anything else are dropped; every emitted line has its + trailing whitespace replaced by a single `\\n`. + + Tree (byte oriented): + * leading whitespace is dropped and elements are re-indented by two + spaces per depth; every start tag, end tag, text line and CDATA + section ends up on its own line. + * `` is expanded into `` and `` (using the element name + as read, see below). + * comments are dropped; a comment of the form + `` records `value`, which replaces the next + text node *that is terminated by a tag* (a text node terminated by a + newline is emitted unchanged and the pending value survives). + * text: `"`, `'` and `>` are escaped as `"`, `'` and `>` + -- except for the first byte of a text node, which is copied raw; + `\\r` is dropped; trailing whitespace of every text line is trimmed. + Text that spans several lines is emitted as several lines, each + indented. `&` is never touched (the script relies on it being + `&` already). + * element and attribute names keep only `[a-zA-Z0-9_]`; every other + byte (`-`, `:`, `.`) is silently dropped (`` becomes + ``). + * attributes are re-emitted as ` name="value"` / ` name='value'` with + exactly one space before each; the value is copied verbatim (no + escaping, newlines included). Whitespace inside a tag outside of a + quoted value is dropped. + * `--delete-attribute NAME` (default `xmlns`, as in `launchTests.sh`) + drops an attribute whose name *starts with* NAME together with its + quoted value. Quirk: the attribute name is consumed with + `^[a-zA-Z_1-9]*=`, so a name containing `:` or `0` (e.g. `xmlns:o-ex`) + does not match; then only the first byte of the name is dropped and + the rest is emitted as a normal attribute (`mlnsoex="…"`). Reproduced. + * CDATA sections are emitted as an indented `` followed by a newline. + * `<` followed by anything other than a letter, `/`, `!--` or `![CDATA[` + aborts the script; the port raises `ArgumentError` with the same + message. + * the tree phase is fed line by line, exactly like the Perl `substr` + loop, so look-ahead (`-->`, `]]>`, the `>` after a self-closing `/`, + the deleted attribute's value) never crosses a line boundary. + """ + + @ws [?\s, ?\t, ?\n, ?\v, ?\f, ?\r] + + @type opts :: [delete_attribute: String.t() | nil] + + @doc """ + Normalises `xml` (a binary) the way `normalize_xml.pl --delete-attribute + xmlns` does. Pass `delete_attribute: nil` to mimic a run without that + option, or another attribute name. + """ + @spec normalize(binary(), opts()) :: binary() + def normalize(xml, opts \\ []) when is_binary(xml) do + ignore = + case Keyword.get(opts, :delete_attribute, "xmlns") do + nil -> "" + name when is_binary(name) -> name + end + + lines = split_lines(xml) + + if lines == [] do + raise ArgumentError, "normalize_xml.pl: the original file is empty" + end + + {line, rest, out} = prologue(lines, []) + out = tree(%{line: line, rest: rest, out: out, ignore: ignore}) + out |> Enum.reverse() |> IO.iodata_to_binary() + end + + # Perl `readline` with the default `$/`: every line keeps its "\n"; the last + # line may lack one; an empty trailing segment is EOF, not a line. + defp split_lines(bin) do + bin + |> String.split("\n") + |> Enum.with_index() + |> then(fn parts -> + n = length(parts) + + parts + |> Enum.map(fn {part, i} -> if i == n - 1, do: part, else: part <> "\n" end) + |> Enum.reject(&(&1 == "")) + end) + end + + # -------------------------------------------------------------------------- + # Prologue: line oriented state machine (states IGNORE, ENC_OPEN, DTD_OPEN, + # COMMENT_OPEN, WRITE, XML_TREE). + # -------------------------------------------------------------------------- + + defp prologue([line | rest], out), do: prologue_loop(:ignore, line, rest, out) + + defp prologue_loop(state, line, rest, out) do + # XML detection + state = + if state == :ignore and Regex.match?(~r/^\s*<[a-zA-Z]/, line), do: :xml_tree, else: state + + # version and encoding detection + state = if state == :ignore and Regex.match?(~r/^\s*<\?/, line), do: :enc_open, else: state + + line = + if state == :enc_open and Regex.match?(~r/^\s*<\?.*\?>\s*$/, line) and + not Regex.match?(~r/\sencoding="[^"]*"/, line) do + # add default encoding + Regex.replace(~r/\s*\?>\s*$/, line, " encoding=\"UTF-8\"?>\n", global: false) + else + line + end + + {state, line} = + if state == :enc_open and Regex.match?(~r/\?>\s*$/, line) do + # uppercase encoding. `.*` does not cross the trailing newline, so the + # extracted value keeps it (upstream quirk, reproduced on purpose). + encoding = + Regex.replace(~r/.*\sencoding="([^"]*)".*/, line, "\\1", global: false) + |> String.upcase(:ascii) + + line = + Regex.replace( + ~r/\sencoding="[^"]*"/, + line, + fn _ -> " encoding=\"" <> encoding <> "\"" end, + global: false + ) + + {:write, line} + else + {state, line} + end + + # DTD detection + state = + if state == :ignore and Regex.match?(~r/^\s*\]/, line) do + # such special XML stuff is lost in WBXML + Regex.replace(~r/\s\[<\?.*\?>\]/, line, "", global: false) + else + line + end + + state = if state == :dtd_open and Regex.match?(~r/>\s*$/, line), do: :write, else: state + + # comment detection + state = + if state == :ignore and Regex.match?(~r/^\s*\s*$/, line), do: :ignore, else: state + + # handle data + {state, line, rest, out} = + case state do + :ignore -> + {line, rest} = next_line!(rest) + {:ignore, line, rest, out} + + :write -> + out = [trim_trailing_ws(line) <> "\n" | out] + {line, rest} = next_line!(rest) + {:ignore, line, rest, out} + + open when open in [:enc_open, :dtd_open, :comment_open] -> + {next, rest} = next_line!(rest) + line = Regex.replace(~r/\s*[\n\r]+\s*/s, line <> next, " ") <> "\n" + {open, line, rest, out} + + :xml_tree -> + {:xml_tree, line, rest, out} + end + + if state == :xml_tree do + {line, rest, out} + else + prologue_loop(state, line, rest, out) + end + end + + defp next_line!([line | rest]), do: {line, rest} + + defp next_line!([]) do + # Perl: `$line = <$ORG_FD>` returns undef and the next regex match dies + # under `warnings FATAL`. + raise ArgumentError, "normalize_xml.pl: reached end of file before the XML tree" + end + + # `s{[\s\r\n]*$}{\n}s`: strip the trailing whitespace run (newline included). + defp trim_trailing_ws(bin), do: Regex.replace(~r/[\s\r\n]*$/s, bin, "", global: false) + + # -------------------------------------------------------------------------- + # Tree: byte oriented state machine. + # -------------------------------------------------------------------------- + + defp tree(%{line: line, rest: rest} = st) do + st = Map.merge(%{state: :neutral, indent: 0, text: "", element: "", expected: ""}, st) + tree_loop(%{st | line: line, rest: rest}) + end + + defp tree_loop(%{line: "", rest: []} = st), do: st.out + + defp tree_loop(%{line: "", rest: [line | rest]} = st) do + tree_loop(%{st | line: line, rest: rest}) + end + + defp tree_loop(%{line: <>} = st) do + st = %{st | line: line} + + # reset text state + st = + if st.state == :text_newline and char not in @ws, do: %{st | state: :neutral}, else: st + + # handle comment or element which starts in a text line + st = + if st.state == :text and char == ?< do + {text, expected} = + if st.expected != "", do: {st.expected, ""}, else: {st.text, st.expected} + + text = Regex.replace(~r/\s*$/, text, "", global: false) + %{st | out: [text <> "\n" | st.out], state: :neutral, text: text, expected: expected} + else + st + end + + # detect and read attribute (the non-ignored branch falls through into + # the ATTRIBUTE_NAME rules) + {st, char, handled} = potential_attribute(st, char) + + st = + if handled do + st + else + step(st, char) + end + + tree_loop(st) + end + + defp potential_attribute(%{state: :potential_attribute} = st, char) + when char in ?a..?z or char in ?A..?Z or char in ?0..?9 or char == ?_ do + ignore = st.ignore + + if ignore != "" and :binary.first(ignore) == char and + String.starts_with?(st.line, binary_part(ignore, 1, byte_size(ignore) - 1)) do + # let's ignore the attribute + line = Regex.replace(~r/^[a-zA-Z_1-9]*=/, st.line, "", global: false) + + line = + if String.starts_with?(line, "'") do + Regex.replace(~r/^'[^']*'/, line, "", global: false) + else + Regex.replace(~r/^"[^"]*"/, line, "", global: false) + end + + {%{st | line: line}, char, true} + else + {%{st | state: :attribute_name, out: [" " | st.out]}, char, false} + end + end + + defp potential_attribute(st, char), do: {st, char, false} + + # try to handle a new comment or element + defp step(%{state: :neutral} = st, ?<) do + if st.line == "" do + raise ArgumentError, "A standalone smaller than \"<\" sign is not allowed in XML." + end + + <> = st.line + st = %{st | line: line} + + cond do + char == ?! -> + cond do + String.starts_with?(line, "--") -> + %{st | line: binary_part(line, 2, byte_size(line) - 2), state: :comment, text: ""} + + String.starts_with?(line, "[CDATA[") -> + %{ + st + | line: binary_part(line, 7, byte_size(line) - 7), + out: [" + raise ArgumentError, + "Only comments and CDATA sections are supported and not with ' + %{ + st + | out: ["<" <> <>, indent(st) | st.out], + indent: st.indent + 1, + element: <>, + state: :element + } + + char == ?/ -> + st = %{st | indent: st.indent - 1} + %{st | out: [" + raise ArgumentError, "A smaller than \"<\" sign must be a tag or a comment." + end + end + + # ignore comments + defp step(%{state: :comment} = st, char) do + if char == ?- and String.starts_with?(st.line, "->") do + st = %{st | line: binary_part(st.line, 2, byte_size(st.line) - 2), state: :neutral} + + # check if this is a special action configuration + if Regex.match?(~r/^\sEXPECTED\s::=\s.*\s$/, st.text) do + expected = Regex.replace(~r/^\sEXPECTED\s::=\s(.*)\s$/, st.text, "\\1", global: false) + %{st | expected: expected, text: ""} + else + st + end + else + %{st | text: st.text <> <>} + end + end + + # read and write text data + defp step(%{state: :neutral} = st, char) when char in @ws, do: st + + defp step(%{state: :neutral} = st, char) do + %{st | out: [indent(st) | st.out], text: <>, state: :text} + end + + defp step(%{state: :text} = st, ?\r), do: st + + defp step(%{state: :text} = st, ?\n) do + text = Regex.replace(~r/\s*$/, st.text, "", global: false) + %{st | out: [text <> "\n" | st.out], text: text, state: :text_newline} + end + + defp step(%{state: :text} = st, ?"), do: %{st | text: st.text <> """} + defp step(%{state: :text} = st, ?'), do: %{st | text: st.text <> "'"} + defp step(%{state: :text} = st, ?<), do: %{st | text: st.text <> "<"} + defp step(%{state: :text} = st, ?>), do: %{st | text: st.text <> ">"} + defp step(%{state: :text} = st, char), do: %{st | text: st.text <> <>} + + defp step(%{state: :text_newline} = st, _char), do: st + + # read element name + defp step(%{state: :element} = st, char) + when char in ?a..?z or char in ?A..?Z or char in ?0..?9 or char == ?_ do + %{st | out: [<> | st.out], element: st.element <> <>} + end + + # detect space for potential attribute + defp step(%{state: :element} = st, char) when char in @ws do + %{st | state: :potential_attribute} + end + + defp step(%{state: :attribute_name} = st, char) + when char in ?a..?z or char in ?A..?Z or char in ?0..?9 or char == ?_ do + %{st | out: [<> | st.out]} + end + + defp step(%{state: :attribute_name} = st, ?=) do + %{st | out: ["=" | st.out], state: :attribute_assign} + end + + defp step(%{state: :attribute_assign} = st, ?") do + %{st | out: ["\"" | st.out], state: :attribute_value_quot} + end + + defp step(%{state: :attribute_value_quot} = st, ?") do + %{st | out: ["\"" | st.out], state: :potential_attribute} + end + + defp step(%{state: :attribute_value_quot} = st, char), do: %{st | out: [<> | st.out]} + + defp step(%{state: :attribute_assign} = st, ?') do + %{st | out: ["'" | st.out], state: :attribute_value_apos} + end + + defp step(%{state: :attribute_value_apos} = st, ?') do + %{st | out: ["'" | st.out], state: :potential_attribute} + end + + defp step(%{state: :attribute_value_apos} = st, char), do: %{st | out: [<> | st.out]} + + # handle standalone element + defp step(%{state: state} = st, ?/) when state in [:element, :potential_attribute] do + # consume the closing ">" and add the complete closing tag + line = Regex.replace(~r/^\s*>/, st.line, "", global: false) + st = %{st | line: line, indent: st.indent - 1} + %{st | out: [" st.element <> ">\n", indent(st), ">\n" | st.out], state: :neutral} + end + + # read element end + defp step(%{state: state} = st, ?>) when state in [:element, :potential_attribute] do + %{st | out: [">\n" | st.out], state: :neutral} + end + + # handle CDATA + defp step(%{state: :cdata} = st, ?]) do + if String.starts_with?(st.line, "]>") do + %{ + st + | line: binary_part(st.line, 2, byte_size(st.line) - 2), + out: ["]]>\n" | st.out], + state: :neutral + } + else + %{st | out: ["]" | st.out]} + end + end + + defp step(%{state: :cdata} = st, char), do: %{st | out: [<> | st.out]} + + # anything else is silently dropped by the Perl loop + defp step(st, _char), do: st + + defp indent(%{indent: n}) when n <= 0, do: "" + defp indent(%{indent: n}), do: String.duplicate(" ", n) + + # -------------------------------------------------------------------------- + # `diff -b` semantics + # -------------------------------------------------------------------------- + + @doc """ + True when `a` and `b` are equal under `diff -b`: whitespace at the end of a + line is ignored and every other run of blanks compares equal to any other + run of blanks. Blank lines still count (no `-B`), and a missing final + newline still counts, as in `diff`. + """ + @spec equal?(binary(), binary()) :: boolean() + def equal?(a, b) when is_binary(a) and is_binary(b) do + canonical_lines(a) == canonical_lines(b) + end + + @doc """ + Readable line diff between `a` and `b` under `diff -b` semantics, meant for + assertion messages: `-` lines come from `a`, `+` lines from `b`, with two + lines of context and at most `:max_changes` changed lines (default 40). + Returns `""` when the two are `equal?/2`. + """ + @spec diff(binary(), binary(), keyword()) :: String.t() + def diff(a, b, opts \\ []) when is_binary(a) and is_binary(b) do + max_changes = Keyword.get(opts, :max_changes, 40) + la = canonical_lines(a) + lb = canonical_lines(b) + + if la == lb do + "" + else + script = List.myers_difference(la, lb) + render_diff(script, max_changes) + end + end + + defp canonical_lines(bin) do + bin + |> String.split("\n") + |> Enum.map(&canonical_line/1) + end + + defp canonical_line(line) do + collapsed = Regex.replace(~r/[ \t\v\f\r]+/, line, " ") + + if String.ends_with?(collapsed, " ") do + binary_part(collapsed, 0, byte_size(collapsed) - 1) + else + collapsed + end + end + + defp render_diff(script, max_changes) do + last = length(script) - 1 + + {lines, _la, _lb, _changes, truncated} = + script + |> Enum.with_index() + |> Enum.reduce({[], 1, 1, 0, false}, fn + {{:eq, ls}, i}, {acc, la, lb, changes, truncated} -> + n = length(ls) + + shown = + cond do + i == 0 -> + ls |> Enum.with_index(la) |> Enum.take(-2) + + i == last -> + ls |> Enum.with_index(la) |> Enum.take(2) + + n > 5 -> + (ls |> Enum.with_index(la) |> Enum.take(2)) ++ + [:gap] ++ (ls |> Enum.with_index(la) |> Enum.take(-2)) + + true -> + ls |> Enum.with_index(la) + end + + rendered = + Enum.map(shown, fn + :gap -> " ..." + {l, no} -> " #{pad(no)} #{inspect_line(l)}" + end) + + {acc ++ rendered, la + n, lb + n, changes, truncated} + + {{:del, ls}, _i}, {acc, la, lb, changes, truncated} -> + {rendered, changes, truncated} = + change_lines(ls, la, "-", changes, max_changes, truncated) + + {acc ++ rendered, la + length(ls), lb, changes, truncated} + + {{:ins, ls}, _i}, {acc, la, lb, changes, truncated} -> + {rendered, changes, truncated} = + change_lines(ls, lb, "+", changes, max_changes, truncated) + + {acc ++ rendered, la, lb + length(ls), changes, truncated} + end) + + header = "--- expected (original, normalised)\n+++ actual (round-tripped, normalised)\n" + + header <> + Enum.join(lines, "\n") <> if(truncated, do: "\n ... (more changes not shown)", else: "") + end + + defp change_lines(ls, start, sign, changes, max_changes, truncated) do + ls + |> Enum.with_index(start) + |> Enum.reduce({[], changes, truncated}, fn {l, no}, {acc, changes, truncated} -> + if changes >= max_changes do + {acc, changes, true} + else + {acc ++ ["#{sign} #{pad(no)} #{inspect_line(l)}"], changes + 1, truncated} + end + end) + end + + defp pad(no), do: String.pad_leading(Integer.to_string(no), 4) + + defp inspect_line(line) do + if String.valid?(line), do: line, else: inspect(line) + end +end diff --git a/test/test_helper.exs b/test/test_helper.exs index 869559e..a697080 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1 +1,5 @@ +# The whole suite runs by default, including the acceptance tests ported from +# upstream libwbxml 0.11.10: `:golden` (byte-exact comparisons against the +# frozen C reference output), `:roundtrip` (the launchTests.sh harness) and +# `:fuzz`. Together they take about ten seconds. ExUnit.start() diff --git a/test/upstream/api/README.md b/test/upstream/api/README.md new file mode 100644 index 0000000..64144ab --- /dev/null +++ b/test/upstream/api/README.md @@ -0,0 +1,64 @@ +# Ports of upstream `test/api` + +Elixir ports of the `check`-based unit tests in libwbxml 0.11.10 +(`test/api/*.c`, commit `e58b1f1`). One file per upstream suite, one ExUnit +test per upstream `START_TEST`, with the same name. Vectors and expectations +are upstream's; where the C API has no Elixir counterpart the test is marked +*adapted* below and the adaptation is described. + +Conventions of the Elixir API that differ from C: + +* Functions return `{:ok, value}` / `{:error, reason}` instead of a + `WBXMLError` code; `reason` is the snake_case atom of the upstream code + (`Libwbxml.Error`). +* **Bad parameters raise `ArgumentError`** (`Libwbxml.encode(nil)`, + `Libwbxml.decode(nil)`, unknown or invalid options) instead of returning + `WBXML_ERROR_BAD_PARAMETER`. The atom `:bad_parameter` still exists in + `Libwbxml.Error.reasons/0` for parity, and it is what the converter returns + for an *empty* WBXML document (as `wbxml_conv_wbxml2xml_run` does). +* `NULL` inputs have no equivalent; the corresponding assertions are covered + by the `ArgumentError` / `FunctionClauseError` behaviour noted per test. + +| Upstream file | Test | Status | Elixir test / notes | +|---|---|---|---| +| `test_wbxml_base64.c` | `test_encode` | ported (adapted) | `base64_test.exs`. `wbxml_base64_encode(NULL/"", 0)` returns `NULL`; `Libwbxml.Base64.encode("")` returns `""` (the `:b64_enc` error is raised by callers). | +| `test_wbxml_base64.c` | `test_decode` | ported (adapted) | `base64_test.exs`. `decode(NULL, …)` cases map to `decode("")` → `{:error, :b64_dec}` and `decode_raw("")` → `""`. | +| `test_wbxml_base64.c` | `test_encode_and_decode` | ported | `base64_test.exs` | +| `test_wbxml_buffers.c` | `test_init_and_destroy` | skipped | C buffer allocation; Elixir binaries have no create/destroy. | +| `test_wbxml_buffers.c` | `test_init_and_destroy_string` | skipped | same | +| `test_wbxml_buffers.c` | `test_init_and_destroy_win32` | skipped | Win32 calling-convention check of `wbxml_buffer_destroy_item`. | +| `test_wbxml_buffers.c` | `test_init_and_destroy_static` | skipped | static (read-only) buffers do not exist in the port. | +| `test_wbxml_buffers.c` | `test_set_char` | skipped | in-place mutation. | +| `test_wbxml_buffers.c` | `test_append` | adapted | `buffers_test.exs`: only the `wbxml_buffer_append_mb_uint_32` part (0 → `<<0>>`, 65537 → `<<0x84, 0x80, 0x01>>`) is meaningful; ported as `Libwbxml.Encoder.Strings.mb_uint32/1`. | +| `test_wbxml_buffers.c` | `test_insert` | skipped | in-place mutation. | +| `test_wbxml_buffers.c` | `test_delete` | skipped | in-place mutation. | +| `test_wbxml_buffers.c` | `test_compare` | skipped | `==` on binaries. | +| `test_wbxml_buffers.c` | `test_search` | adapted | `buffers_test.exs`: the non-NULL cases of `wbxml_buffer_search_char/search/search_cstr` against `Libwbxml.Encoder.Strings.search/3` (empty needle found at 0, start offset, search after end). | +| `test_wbxml_buffers.c` | `test_split_words` | ported | `buffers_test.exs` (`Libwbxml.Encoder.Strings.split_words/1`); the `NULL` case is a `FunctionClauseError`. | +| `test_wbxml_buffers.c` | `test_duplicate` | skipped | immutable binaries. | +| `test_wbxml_buffers.c` | `test_conversion_hex` | ported | `buffers_test.exs` (`binary_to_hex/2`, `hex_to_binary/1`) | +| `test_wbxml_buffers.c` | `test_conversion_base64` | ported | `buffers_test.exs` (`Libwbxml.Base64.encode/1`, `decode/1`) | +| `test_wbxml_buffers.c` | `test_shrink_blanks` | ported | `buffers_test.exs` (`shrink_blanks/1`) | +| `test_wbxml_buffers.c` | `test_strip_blanks` | ported | `buffers_test.exs` (`strip_blanks/1`) | +| `test_wbxml_buffers.c` | `test_remove_trailing_zeros` | ported | `buffers_test.exs` (`remove_trailing_zeros/1`) | +| `test_wbxml_buffers.c` | `test_buffer_get_char_wrong_params` | skipped | bounds checking of `wbxml_buffer_get_char`; binary pattern matching. | +| `test_wbxml_charset.c` | `test_charset_existence` | ported | `charset_test.exs` | +| `test_wbxml_conv.c` | `security_test_conv_init_null_reference` | ported (adapted) | `conv_test.exs`: `NULL` converter reference → `Libwbxml.encode(nil)` / `Libwbxml.decode(nil)` raise `ArgumentError` (see above). | +| `test_wbxml_encoder_internals.c` | `security_test_xml_build_result_null_params` | ported (adapted) | `encoder_internals_test.exs`: `Libwbxml.XML.Writer.write/2` on a tree with no (or an unknown) language → `{:error, :lang_table_undefined}` (upstream fails in `xml_fill_header`). The `NULL` output pointer case (`WBXML_ERROR_BAD_PARAMETER`) has no equivalent; passing a non-tree is a `FunctionClauseError`. | +| `test_wbxml_errors.c` | `security_test_errors_datetime_without_percent` | ported | `errors_test.exs` | +| `test_wbxml_errors.c` | `test_errors_ok` | ported | `errors_test.exs` | +| `test_wbxml_errors.c` | `test_errors_last_item` | ported | `errors_test.exs` | +| `test_wbxml_errors.c` | `test_errors_unknown_error_code` | ported | `errors_test.exs` (`Libwbxml.Error.message(127)`) | +| `test_wbxml_lists.c` | `test_init_and_destroy` | skipped | `WBXMLList` is a C container; Elixir lists replace it. | +| `test_wbxml_lists.c` | `test_append_not_null` | skipped | same | +| `test_wbxml_lists.c` | `test_insert_not_null` | skipped | same | +| `test_wbxml_lists.c` | `test_insert_wrong_pos` | skipped | same | +| `test_wbxml_lists.c` | `test_append` | skipped | same | +| `test_wbxml_lists.c` | `test_insert` | skipped | same | +| `test_wbxml_lists.c` | `test_extract_first` | skipped | same | +| `test_wbxml_lists.c` | `test_destructor` | skipped | same | +| `test_wbxml_parser_internals.c` | `test_parser_decode_datetime` | ported (adapted) | `parser_internals_test.exs` via `Libwbxml.Opaque.decode_datetime/1` (the plan's `Libwbxml.Parser.decode_datetime/1` lives in `Libwbxml.Opaque` because the encoder shares it). The `NULL` buffer case (`WBXML_ERROR_INTERNAL`) is a `FunctionClauseError`. | + +Additional behaviour of the same C functions that upstream does not unit-test +(base64 tolerance, WV integer/datetime, blank handling quirks) is covered in +`test/libwbxml/*_test.exs`, with vectors generated by running the C code. diff --git a/test/upstream/api/base64_test.exs b/test/upstream/api/base64_test.exs new file mode 100644 index 0000000..6812a5c --- /dev/null +++ b/test/upstream/api/base64_test.exs @@ -0,0 +1,32 @@ +defmodule Libwbxml.Upstream.API.Base64Test do + # Port of upstream test/api/test_wbxml_base64.c + use ExUnit.Case, async: true + + alias Libwbxml.Base64 + + test "test_encode" do + # verify empty strings: upstream returns NULL for NULL / zero-length input; + # the port returns "" and leaves the :b64_enc error to callers. + assert Base64.encode("") == "" + + # encode a string + result = Base64.encode("test") + assert byte_size(result) == 8 + assert result == "dGVzdA==" + end + + test "test_decode" do + # verify empty strings (NULL / zero-length input decodes to <= 0 bytes) + assert Base64.decode("") == {:error, :b64_dec} + assert Base64.decode_raw("") == "" + + # decode a string + assert Base64.decode("dGVzdA==") == {:ok, "test"} + assert Base64.decode_raw("dGVzdA==") == "test" + end + + test "test_encode_and_decode" do + enc = Base64.encode("test") + assert Base64.decode(enc) == {:ok, "test"} + end +end diff --git a/test/upstream/api/buffers_test.exs b/test/upstream/api/buffers_test.exs new file mode 100644 index 0000000..5cb008e --- /dev/null +++ b/test/upstream/api/buffers_test.exs @@ -0,0 +1,91 @@ +defmodule Libwbxml.Upstream.API.BuffersTest do + # Port of the semantic tests in upstream test/api/test_wbxml_buffers.c. + # Buffer allocation / mutation tests are skipped (see README.md). + use ExUnit.Case, async: true + + alias Libwbxml.Base64 + alias Libwbxml.Encoder.Strings + + # Only the wbxml_buffer_append_mb_uint_32 part of test_append is meaningful. + test "test_append (mb_uint_32 part, adapted)" do + # |00000000|00000000|00000000|00000000| => 0 => |00000000| + assert Strings.mb_uint32(0) == <<0>> + # 0x010001 == 65537 => |10000100|10000000|00000001| + assert 0x010001 == 65537 + assert Strings.mb_uint32(65537) == <<0x84, 0x80, 0x01>> + end + + test "test_search (adapted)" do + # test with empty buffer + assert Strings.search("", "123") == nil + assert Strings.search("", "") == 0 + + # test with filled buffer + buf = "test123ABCD" + assert Strings.search(buf, "3") == 6 + assert Strings.search(buf, "3", 7) == nil + + assert Strings.search(buf, "123", 4) == 4 + assert Strings.search(buf, "123", 5) == nil + + assert Strings.search(buf, "123") == 4 + assert Strings.search(buf, "") == 0 + + # search after end + assert Strings.search(buf, "3", byte_size(buf)) == nil + assert Strings.search(buf, "123", byte_size(buf)) == nil + end + + test "test_split_words" do + # test with null/empty buffer + assert_raise FunctionClauseError, fn -> apply(Strings, :split_words, [nil]) end + assert Strings.split_words("") == [] + assert Strings.split_words(" \n\r\v\f\t") == [] + + # split several words and verify it + assert Strings.split_words(" 1\n2\r3\v4\f5\t") == ["1", "2", "3", "4", "5"] + end + + test "test_conversion_hex" do + bin = "test image" + hex = "7465737420696D616765" + + # test convert to hex + assert Strings.binary_to_hex(bin, :upper) == hex + + # test convert to binary + assert Strings.hex_to_binary(hex) == bin + end + + test "test_conversion_base64" do + bin = "test image\n" + b64 = "dGVzdCBpbWFnZQo=" + + # test convert to base64 + assert Base64.encode(bin) == b64 + + # test convert to binary + assert Base64.decode(b64) == {:ok, bin} + end + + test "test_shrink_blanks" do + raw = " \n\t\rtest\n\f\t image\t\v \n" + fix = " test image " + + assert Strings.shrink_blanks(raw) == fix + end + + test "test_strip_blanks" do + raw = " \n\t\f\rtest image\t\v \n" + fix = "test image" + + assert Strings.strip_blanks(raw) == fix + end + + test "test_remove_trailing_zeros" do + raw = <<"test image", 0, 0, 0>> + fix = "test image" + + assert Strings.remove_trailing_zeros(raw) == fix + end +end diff --git a/test/upstream/api/charset_test.exs b/test/upstream/api/charset_test.exs new file mode 100644 index 0000000..7cb5f3f --- /dev/null +++ b/test/upstream/api/charset_test.exs @@ -0,0 +1,14 @@ +defmodule Libwbxml.Upstream.API.CharsetTest do + # Port of upstream test/api/test_wbxml_charset.c + use ExUnit.Case, async: true + + alias Libwbxml.Charset + + test "test_charset_existence" do + for name <- ["UTF-8", "UTF-16", "ISO-8859-1", "US-ASCII"] do + assert {:ok, mib} = Charset.from_name(name) + assert {:ok, charset} = Charset.name(mib) + assert charset == name + end + end +end diff --git a/test/upstream/api/conv_test.exs b/test/upstream/api/conv_test.exs new file mode 100644 index 0000000..4c353e7 --- /dev/null +++ b/test/upstream/api/conv_test.exs @@ -0,0 +1,20 @@ +defmodule Libwbxml.Upstream.API.ConvTest do + # Port of upstream test/api/test_wbxml_conv.c + use ExUnit.Case, async: true + + # Upstream: creating a converter through a NULL reference returns + # WBXML_ERROR_BAD_PARAMETER. In Elixir, bad parameters raise ArgumentError + # (see README.md); :bad_parameter is kept as a reason atom for parity. + test "security_test_conv_init_null_reference" do + assert_raise ArgumentError, ~r/expected wbxml to be a binary/, fn -> + apply(Libwbxml, :decode, [nil]) + end + + assert_raise ArgumentError, ~r/expected xml to be a string or iodata/, fn -> + apply(Libwbxml, :encode, [nil]) + end + + assert :bad_parameter in Libwbxml.Error.reasons() + assert Libwbxml.Error.message(:bad_parameter) == "Bad Parameter" + end +end diff --git a/test/upstream/api/encoder_internals_test.exs b/test/upstream/api/encoder_internals_test.exs new file mode 100644 index 0000000..6798b81 --- /dev/null +++ b/test/upstream/api/encoder_internals_test.exs @@ -0,0 +1,25 @@ +defmodule Libwbxml.Upstream.API.EncoderInternalsTest do + # Port of upstream test/api/test_wbxml_encoder_internals.c + use ExUnit.Case, async: true + + alias Libwbxml.Tree + alias Libwbxml.Tree.Element + alias Libwbxml.XML.Writer + + # Upstream builds an XML result from a freshly created encoder whose tree + # has no language table: `xml_build_result(encoder, NULL, &len)` is a bad + # parameter and `xml_build_result(encoder, &xml, &len)` fails in + # `xml_fill_header` with WBXML_ERROR_LANG_TABLE_UNDEFINED. + test "security_test_xml_build_result_null_params" do + tree = %Tree{lang: nil, root: %Element{name: {:literal, "root"}}} + + # NULL output pointer => WBXML_ERROR_BAD_PARAMETER: there is no output + # pointer in Elixir; passing something that is not a tree is a + # FunctionClauseError instead (see README). + assert_raise FunctionClauseError, fn -> apply(Writer, :write, [nil, %{}]) end + + # No language table => WBXML_ERROR_LANG_TABLE_UNDEFINED + assert Writer.write(tree, %{}) == {:error, :lang_table_undefined} + assert Writer.write(%Tree{tree | lang: :no_such_language}) == {:error, :lang_table_undefined} + end +end diff --git a/test/upstream/api/errors_test.exs b/test/upstream/api/errors_test.exs new file mode 100644 index 0000000..aa08066 --- /dev/null +++ b/test/upstream/api/errors_test.exs @@ -0,0 +1,31 @@ +defmodule Libwbxml.Upstream.API.ErrorsTest do + # Port of upstream test/api/test_wbxml_errors.c + use ExUnit.Case, async: true + + alias Libwbxml.Error + + @unknown "Unknown Error Code" + + test "security_test_errors_datetime_without_percent" do + refute Error.message(:bad_datetime) =~ "%" + end + + test "test_errors_ok" do + assert is_binary(Error.message(:ok)) + assert Error.message(:ok) != @unknown + assert Error.message(0) != @unknown + end + + test "test_errors_last_item" do + assert is_binary(Error.message(:xmlparser_output_utf16)) + assert Error.message(:xmlparser_output_utf16) != @unknown + + assert is_binary(Error.message(:charset_not_found)) + assert Error.message(:charset_not_found) != @unknown + end + + test "test_errors_unknown_error_code" do + assert Error.message(127) == @unknown + assert Error.from_code(127) == nil + end +end diff --git a/test/upstream/api/parser_internals_test.exs b/test/upstream/api/parser_internals_test.exs new file mode 100644 index 0000000..3cca0e7 --- /dev/null +++ b/test/upstream/api/parser_internals_test.exs @@ -0,0 +1,37 @@ +defmodule Libwbxml.Upstream.API.ParserInternalsTest do + # Port of upstream test/api/test_wbxml_parser_internals.c + use ExUnit.Case, async: true + + alias Libwbxml.Opaque + + # This test case verifies the standard compliance. + # The used timestamp is exactly the example from the OMA specification. + # 2002-04-16T06:40:00Z + # 0010 0000 0000 0010 => 2 0 0 2 + # 0000 0100 => 0 4 + # 0001 0110 => 1 6 + # 0000 0110 => 0 6 + # 0100 0000 => 4 0 + # 0000 0000 => 0 0 (not encoded - omitted) + test "test_parser_decode_datetime" do + opaque = <<0x20, 0x02, 0x04, 0x16, 0x06, 0x40, 0x12>> + + # test timestamp including seconds + assert Opaque.decode_datetime(binary_part(opaque, 0, 7)) == {:ok, "2002-04-16T06:40:12Z"} + + # test timestamp including minutes - OMA example + assert Opaque.decode_datetime(binary_part(opaque, 0, 6)) == {:ok, "2002-04-16T06:40:00Z"} + + # test timestamp including hours + assert Opaque.decode_datetime(binary_part(opaque, 0, 5)) == {:ok, "2002-04-16T06:00:00Z"} + + # test timestamp including date + assert Opaque.decode_datetime(binary_part(opaque, 0, 4)) == {:ok, "2002-04-16T00:00:00Z"} + + # test incomplete timestamp => ERROR + assert Opaque.decode_datetime(binary_part(opaque, 0, 3)) == {:error, :bad_datetime} + + # test NULL timestamp => ERROR (WBXML_ERROR_INTERNAL upstream) + assert_raise FunctionClauseError, fn -> apply(Opaque, :decode_datetime, [nil]) end + end +end diff --git a/test/upstream/fuzz_test.exs b/test/upstream/fuzz_test.exs new file mode 100644 index 0000000..2fc7e08 --- /dev/null +++ b/test/upstream/fuzz_test.exs @@ -0,0 +1,184 @@ +defmodule Libwbxml.Upstream.FuzzCases do + @moduledoc false + # Builds the mutation plan for `Libwbxml.Upstream.FuzzTest` at compile time. + # + # Inputs: + # * the three upstream crash reproducers in test/fixtures/fuzz/ + # * `<<>>` and `<<1, 2, 3, 4>>` + # * every golden `.wbxml`, `.anon.wbxml` and `.nostrtbl.wbxml` in the + # manifest, truncated at 1, 2, 3, 5, 8, len/2 and len-1 bytes, plus + # `@flips_per_file` single-byte XOR flips at offsets drawn from + # `:rand.seed(:exsss, @seed)`. + # + # The flips are drawn in one sequential pass over the goldens in manifest + # order, so the plan is fully deterministic and independent of ExUnit's + # seed / async scheduling. Only offsets and XOR masks are stored; the file + # bytes are read at test time. + + alias Libwbxml.TestFixtures, as: Fixtures + + @seed {1, 2, 3} + @flips_per_file 3 + @truncations [1, 2, 3, 5, 8] + + @doc "Fixed (name, binary) cases that are not derived from goldens." + def fixed do + fuzz = + for path <- Fixtures.fuzz_inputs() do + {"fuzz/" <> Path.basename(path), File.read!(path)} + end + + fuzz ++ [{"empty", <<>>}, {"<<1, 2, 3, 4>>", <<1, 2, 3, 4>>}] + end + + @doc """ + One entry per golden WBXML file: + `%{name, path, size, truncations: [n], flips: [{offset, xor_mask}]}`. + """ + def goldens do + :rand.seed(:exsss, @seed) + + for {key, entry} <- Fixtures.entries(), + variant <- [:wbxml, :nostrtbl, :anon], + entry[variant] == :ok do + path = Fixtures.golden_path(entry, variant) + size = File.stat!(path).size + + truncations = + (@truncations ++ [div(size, 2), size - 1]) + |> Enum.filter(&(&1 >= 0 and &1 < size)) + |> Enum.uniq() + |> Enum.sort() + + flips = + for _ <- 1..@flips_per_file, size > 0 do + {:rand.uniform(size) - 1, :rand.uniform(255)} + end + + %{ + name: "#{key} #{variant}", + key: key, + variant: variant, + path: path, + size: size, + truncations: truncations, + flips: flips + } + end + end + + @doc "Materialises the `{label, binary}` mutations of a golden plan entry." + def mutations(%{path: path, truncations: truncations, flips: flips}) do + bin = File.read!(path) + + truncs = for n <- truncations, do: {"truncated to #{n} bytes", binary_part(bin, 0, n)} + + flipped = + for {offset, mask} <- flips do + <> = bin + + {"byte #{offset} xor 0x#{Integer.to_string(mask, 16)}", + <>} + end + + truncs ++ flipped + end + + @doc """ + Runs `fun.(binary)` in a separate task with a time bound. + + Returns the function's result, `{:raised, exception, stacktrace}`, + `{:exit, reason}` or `:timeout`; never propagates the failure to the caller. + """ + def guarded(fun, bin, timeout_ms) do + task = + Task.async(fn -> + try do + fun.(bin) + rescue + e -> {:raised, e, __STACKTRACE__} + catch + kind, value -> {:raised, {kind, value}, __STACKTRACE__} + end + end) + + case Task.yield(task, timeout_ms) || Task.shutdown(task, :brutal_kill) do + {:ok, result} -> result + {:exit, reason} -> {:exit, reason} + nil -> :timeout + end + end +end + +defmodule Libwbxml.Upstream.FuzzTest do + @timeout_ms 5_000 + + @moduledoc """ + Robustness contract for `Libwbxml.decode/1` (port of upstream `test/fuzz`): + for any input, decoding returns `{:ok, _}` or `{:error, _}`, never raises, + exits or hangs, within `#{@timeout_ms}` ms per input. + + `decode/1` uses the default options, i.e. the forced `:activesync` language. + + One test per golden WBXML file, looping over its truncations and byte flips + (see `Libwbxml.Upstream.FuzzCases`), plus one test per fixed input. All + tests run by default; the module is fast (a few seconds in total). + + mix test test/upstream/fuzz_test.exs + mix test test/upstream/fuzz_test.exs --only fuzz_fixed + """ + + use ExUnit.Case, async: true + + alias Libwbxml.Upstream.FuzzCases + + @moduletag :fuzz + @moduletag timeout: 60_000 + + for {name, bin} <- FuzzCases.fixed() do + @tag :fuzz_fixed + test "decode/1 survives #{name}" do + check_contract(unquote(name), unquote(bin)) + end + end + + for plan <- FuzzCases.goldens() do + @tag :fuzz_golden + @tag String.to_atom(Libwbxml.TestFixtures.dir(plan.key) || "project") + @tag fixture: plan.key, variant: plan.variant + test "decode/1 survives mutations of #{plan.name}" do + plan = unquote(Macro.escape(plan)) + + for {label, bin} <- FuzzCases.mutations(plan) do + check_contract("#{plan.name} #{label}", bin) + end + end + end + + defp check_contract(label, bin) do + case FuzzCases.guarded(&Libwbxml.decode/1, bin, @timeout_ms) do + {:ok, _} -> + :ok + + {:error, _} -> + :ok + + {:raised, exception, stacktrace} -> + flunk( + "#{label}: decode/1 raised #{Exception.format(:error, exception, stacktrace)}\n" <> + "input: #{inspect(bin, limit: 64)}" + ) + + {:exit, reason} -> + flunk("#{label}: decode/1 exited: #{inspect(reason)}\ninput: #{inspect(bin, limit: 64)}") + + :timeout -> + flunk("#{label}: decode/1 did not return within #{@timeout_ms} ms") + + other -> + flunk( + "#{label}: decode/1 returned #{inspect(other, limit: 20)}, expected {:ok, _} | {:error, _}" + ) + end + end +end diff --git a/test/upstream/golden_test.exs b/test/upstream/golden_test.exs new file mode 100644 index 0000000..6a58789 --- /dev/null +++ b/test/upstream/golden_test.exs @@ -0,0 +1,244 @@ +defmodule Libwbxml.Upstream.GoldenCases do + @moduledoc false + # Expands `test/fixtures/upstream/manifest.exs` into the list of golden cases + # that `Libwbxml.Upstream.GoldenTest` turns into tests at compile time. + # + # Every case is a map: + # :key manifest key, e.g. "si/si-001.xml" + # :dir upstream dir ("si") or "project" for test/fixtures/*.xml + # :op :encode | :decode + # :variant :wbxml | :nostrtbl | :anon | :wbxml_xml | :anon_wbxml_xml | + # :compact | :canonical | :indent2 + # :status :ok | {:error, atom, message} + # :input absolute path of the input (XML for encode, WBXML for decode) + # :golden absolute path of the expected output + # :opts keyword list passed to Libwbxml.encode/2 or decode/2 + + alias Libwbxml.TestFixtures, as: Fixtures + + # Encode variants: golden name -> Libwbxml.encode/2 options. + # .wbxml xml2wbxml (defaults) -> string table on, public ID on + # .nostrtbl.wbxml xml2wbxml -n -> string table off, public ID on + # .anon.wbxml xml2wbxml -a -> Libwbxml.encode/2 defaults (anonymous) + @encode_variants [ + wbxml: [anonymous: false], + nostrtbl: [anonymous: false, string_table: false], + anon: [] + ] + + # Decode variants: golden name -> {wbxml source variant, extra decode/2 options}. + # .wbxml.xml wbxml2xml [-l L] (indent, delta 0; -l only when :decode_lang_flag) + # .anon.wbxml.xml wbxml2xml -l L on the .anon.wbxml (Libwbxml.decode/2 defaults) + # .wbxml.compact.xml wbxml2xml -m 0 + # .wbxml.canonical.xml wbxml2xml -m 2 + # .wbxml.indent2.xml wbxml2xml -i 2 + @decode_variants [ + wbxml_xml: {:wbxml, []}, + anon_wbxml_xml: {:anon, []}, + compact: {:wbxml, [format: :compact]}, + canonical: {:wbxml, [format: :canonical]}, + indent2: {:wbxml, [format: :indent, indent: 2]} + ] + + # Upstream `wbxml_errors.c` messages -> `Libwbxml.Error` reason atoms. + @error_atoms %{ + "Attribute Table Undefined" => :attr_table_undefined, + "Bad Datetime Format" => :bad_datetime, + "Bad Parameter" => :bad_parameter, + "Internal Error" => :internal, + "Languages Table Undefined" => :lang_table_undefined, + "Not Enough Memory" => :not_enough_memory, + "Not Implemented" => :not_implemented, + "Tag Table Undefined" => :tag_table_undefined, + "Failed to encode Base64" => :b64_enc, + "Failed to decode Base64" => :b64_dec, + "Bad Wireless-Village Date and Time Format" => :wv_datetime_format, + "No built-in charset converter (Compiled without libiconv)" => :no_charset_conv, + "Bad string length, can't convert" => :charset_str_len, + "Attribute Value Table Undefined" => :attr_value_table_undefined, + "Bad Literal Index" => :bad_literal_index, + "Not NULL Terminated String in String Table" => :bad_null_terminated_string_in_string_table, + "Bad Opaque Length" => :bad_opaque_length, + "Empty WBXML" => :empty_wbxml, + "Unexpected End Of WBXML Buffer" => :end_of_buffer, + "Entity Code Overflow" => :entity_code_overflow, + "Extension Value Table Undefined" => :ext_value_table_undefined, + "Invalid String Table Index" => :invalid_strtbl_index, + "Literal Not NULL Terminated in String Table" => :literal_not_null_terminated_in_string_table, + "Not NULL Terminated Inline String" => :not_null_terminated_inline_string, + "Null Parser" => :null_parser, + "No String Table In Document" => :null_string_table, + "String Expected" => :string_expected, + "Bad String Table Length" => :strtbl_length, + "Unknown Attribute" => :unknown_attr, + "Unknown Attribute Value" => :unknown_attr_value, + "Unknown Extension Token" => :unknown_extension_token, + "Unknown Extension Value token" => :unknown_extension_value, + "Unknown Public ID" => :unknown_public_id, + "Unknown Tag" => :unknown_tag, + "Unvalid MultiByte UINT32" => :unvalid_mbuint32, + "Wireless-Village Integer Overflow" => :wv_integer_overflow, + "Can't append data to output buffer" => :encoder_append_data, + "String Table generation disabled: can't encode Literal" => :strtbl_disabled, + "The XML language is unknown." => :unknown_xml_language, + "XML Node Type not allowed" => :xml_node_not_allowed, + "NULL XML Attribute Name" => :xml_null_attr_name, + "Parsing of XML Document Failed" => :xml_parsing_failed, + "The conversion of a XML DevInf document failed" => :xml_devinf_conv_failed, + "The character set is unknown." => :charset_unknown, + "The converter for the character set cannot be initialized." => :charset_conv_init, + "The character conversion failed." => :charset_conv, + "The character set cannot be found." => :charset_not_found, + "Invalid Unicode character detected." => :invalid_unicode + } + + @doc "Every golden case in the manifest (`:ok` and `{:error, _}` variants only)." + def all do + for {key, entry} <- Fixtures.entries(), + case_ <- cases_for(key, entry), + do: case_ + end + + defp cases_for(key, entry) do + dir = Fixtures.dir(key) || "project" + common = %{key: key, dir: dir, language: entry.language, input: Fixtures.input_path(entry)} + + encodes = + for {variant, opts} <- @encode_variants, + status = status(entry, variant), + status != :skipped do + Map.merge(common, %{ + op: :encode, + variant: variant, + status: status, + golden: Fixtures.golden_path(entry, variant), + opts: opts + }) + end + + decodes = + for {variant, {source, extra}} <- @decode_variants, + status = status(entry, variant), + status != :skipped do + Map.merge(common, %{ + op: :decode, + variant: variant, + status: status, + input: Fixtures.golden_path(entry, source), + golden: Fixtures.golden_path(entry, variant), + opts: [language: decode_language(entry, variant)] ++ extra + }) + end + + encodes ++ decodes + end + + # `.anon.wbxml.xml` was always produced with `-l L`; the other decode goldens + # only when the manifest says so (ota, airsync, *.ddf), otherwise the language + # comes from the document's public ID (`nil`). + defp decode_language(%{language: language}, :anon_wbxml_xml), do: language + + defp decode_language(%{language: language, decode_lang_flag: flag}, _variant), + do: if(flag, do: language, else: nil) + + defp status(entry, variant) do + case Map.fetch!(entry, variant) do + :ok -> + :ok + + :skipped -> + :skipped + + {:error, message} -> + atom = + Map.get(@error_atoms, message) || + raise "manifest error message has no atom in #{__MODULE__}: #{inspect(message)}" + + {:error, atom, message} + end + end +end + +defmodule Libwbxml.Upstream.GoldenTest do + @moduledoc """ + Byte-exact golden tests against the output of the upstream C reference + tools, generated at compile time from `test/fixtures/upstream/manifest.exs`. + + One test per fixture x variant. Encode variants compare + `Libwbxml.encode(xml, opts)` with the `.wbxml` / `.nostrtbl.wbxml` / + `.anon.wbxml` golden; decode variants compare `Libwbxml.decode(wbxml, opts)` + with the `.wbxml.xml` / `.anon.wbxml.xml` / `.wbxml.{compact,canonical,indent2}.xml` + golden (option mapping in `Libwbxml.Upstream.GoldenCases`). Manifest entries + recorded as `{:error, message}` (the drmrel `-n` cases) assert the matching + `{:error, atom}` instead. + + The goldens were produced once, with `xml2wbxml` / `wbxml2xml` from + libwbxml 0.11.10, and are frozen; see `test/fixtures/upstream/manifest.exs`. + + ## Tags + + Every test carries: `:golden`; `:encode` or `:decode`; the fixture directory + (`:activesync`, `:airsync`, `:conml`, `:ddf`, `:drmrel`, `:emn`, `:ota`, + `:prov`, `:si`, `:sl`, `:syncml`, `:wv`, or `:project` for + `test/fixtures/*.xml`); the composite `:_` (e.g. `:si_decode`); and + the key-value tags `variant: ` and `fixture: ""`. + + ## Running subsets + + `--only X` runs *every* test tagged `X` and you cannot intersect two tags + with `--only A --exclude B`, so use the composite/key-value tags: + + mix test test/upstream/golden_test.exs # everything + mix test test/upstream/golden_test.exs --only encode # all encode goldens + mix test test/upstream/golden_test.exs --only decode # all decode goldens + mix test test/upstream/golden_test.exs --only activesync # one directory + mix test test/upstream/golden_test.exs --only si_decode # one dir, one direction + mix test test/upstream/golden_test.exs --only variant:compact # one golden variant + mix test test/upstream/golden_test.exs --only fixture:si/si-001.xml + """ + + use ExUnit.Case, async: true + + alias Libwbxml.GoldenDiff + alias Libwbxml.Upstream.GoldenCases + + @moduletag :golden + + for case_ <- GoldenCases.all() do + %{key: key, dir: dir, op: op, variant: variant, status: status} = case_ + input = case_.input + golden = case_.golden + opts = case_.opts + + @tag String.to_atom(dir) + @tag String.to_atom("#{dir}_#{op}") + @tag op + @tag variant: variant, fixture: key + + case status do + :ok -> + test "#{key} #{op} #{variant} == #{Path.basename(golden)} with #{inspect(opts)}" do + input = File.read!(unquote(input)) + expected = File.read!(unquote(golden)) + label = "#{unquote(key)} #{unquote(variant)} (#{unquote(op)} #{inspect(unquote(opts))})" + + case run(unquote(op), input, unquote(opts)) do + {:ok, actual} -> + if message = GoldenDiff.explain(label, expected, actual), do: flunk(message) + + other -> + flunk("#{label}: expected {:ok, binary}, got #{inspect(other, limit: 20)}") + end + end + + {:error, atom, message} -> + test "#{key} #{op} #{variant} fails with #{inspect(atom)} (\"#{message}\")" do + input = File.read!(unquote(input)) + assert run(unquote(op), input, unquote(opts)) == {:error, unquote(atom)} + end + end + end + + defp run(:encode, xml, opts), do: Libwbxml.encode(xml, opts) + defp run(:decode, wbxml, opts), do: Libwbxml.decode(wbxml, opts) +end diff --git a/test/upstream/normalize_test.exs b/test/upstream/normalize_test.exs new file mode 100644 index 0000000..dbc14f0 --- /dev/null +++ b/test/upstream/normalize_test.exs @@ -0,0 +1,221 @@ +defmodule Libwbxml.Upstream.NormalizeTest do + @moduledoc """ + Tests for `Libwbxml.TestNormalize`, the port of upstream + `test/tools/normalize_xml.pl`. + + The hand-written expectations below were all produced by running the Perl + script itself on the same input, quirks included -- most visibly the newline that the script leaves inside + `encoding="UTF-8\\n"` (see the module doc of `Libwbxml.TestNormalize`). + """ + + use ExUnit.Case, async: true + + alias Libwbxml.TestNormalize + + import TestNormalize, only: [normalize: 1, normalize: 2, equal?: 2, diff: 2] + + @decl "\n" + + describe "normalize/2 prologue" do + test "adds encoding=\"UTF-8\" when the declaration has none" do + assert normalize("\n\n") == @decl <> "\n\n" + end + + test "upper-cases an existing encoding (keeping the trailing newline, as upstream)" do + assert normalize("\n\n") == + "\n\n\n" + end + + test "appends the default encoding after other declaration attributes" do + assert normalize("\n\n") == + "\n\n\n" + end + + test "strips a [] internal subset from the DOCTYPE" do + xml = + "\n" <> + "]>\n" <> + "\n" + + assert normalize(xml) == + @decl <> + "\n\n\n" + end + + test "joins a multi-line DOCTYPE into one line" do + xml = + "\n" <> + " + "\t\t\"http://www.wapforum.org/DTD/si.dtd\">\n" <> + "\n x\n\n" + + assert normalize(xml) == + @decl <> + "\n" <> + "\n \n x\n \n\n" + end + + test "drops comments and blank lines before the root element" do + assert normalize("\n\n\n\n\n\n\n") == + @decl <> "\n\n" + + assert normalize("\n\n\n\n") == + @decl <> "\n\n" + end + + test "works without an XML declaration" do + assert normalize("\nt\n\n") == "\n \n t\n \n\n" + end + + test "handles CRLF line endings" do + xml = + "\r\n\r\n\r\n t\r\n\r\n" + + assert normalize(xml) == + @decl <> "\n\n \n t\n \n\n" + end + end + + describe "normalize/2 tree" do + test "re-indents by two spaces per depth, one node per line" do + assert normalize("\n\n\nt\n\n\n") == + @decl <> "\n \n \n t\n \n \n\n" + end + + test "expands self-closing elements" do + assert normalize( + "\n\n" + ) == + @decl <> + "\n \n \n \n \n \n \n\n" + end + + test "strips comments inside the tree, splitting the surrounding text" do + assert normalize("\nx z\n") == + @decl <> "\n x\n z\n\n" + end + + test "EXPECTED ::= replaces the next text node terminated by a tag" do + xml = + "\n\n \n 0x2A\n keep\n\n" + + assert normalize(xml) == + @decl <> "\n \n 42\n \n \n keep\n \n\n" + end + + test "EXPECTED ::= survives a text node terminated by a newline (upstream quirk)" do + xml = + "\n\n \n" <> + " text ends with newline\n \n replaced\n\n" + + assert normalize(xml) == + @decl <> + "\n \n text ends with newline\n \n \n 42\n \n\n" + end + + test "deletes xmlns attributes (and anything whose name starts with xmlns)" do + xml = + "\n\n" + + assert normalize(xml) == + @decl <> "\n \n \n \n \n\n" + end + + test "delete_attribute: nil keeps xmlns" do + assert normalize("\n\n", delete_attribute: nil) == + @decl <> "\n\n" + end + + test "prefixed xmlns:… is mangled, not deleted (upstream quirk)" do + xml = + "\n" <> + "1\n" + + assert normalize(xml) == + @decl <> + "\n \n 1\n \n\n" + end + + test "escapes quotes, apostrophes and > in text, except the first byte (upstream quirk)" do + xml = "\n\"quoted\" 'apos' 1 > 0 & more\n>first\n" + + assert normalize(xml) == + @decl <> + "\n \"quoted" 'apos' 1 > 0 & more\n\n\n >first\n\n" + end + + test "trims trailing whitespace of every text line, drops CR and blank lines" do + xml = "\nline one \n line two\r\n\n line three\n" + assert normalize(xml) == @decl <> "\n line one\n line two\n line three\n\n" + end + + test "copies CDATA sections verbatim" do + assert normalize("\n\n & ]]>\n") == + @decl <> "\n \n \n & ]]>\n \n\n" + end + + test "re-emits attributes with one space each, values verbatim, tag whitespace dropped" do + assert normalize( + "\nt\n" + ) == + @decl <> "\n t\n\n" + + assert normalize("\nb\" y='ct\n") == + @decl <> "b\" y='c\n t\n\n" + end + + test "drops non [a-zA-Z0-9_] bytes from element and attribute names (upstream quirk)" do + assert normalize("\n\n") == + @decl <> "\n \n \n\n" + end + + test "input without a trailing newline" do + assert normalize("\nt") == @decl <> "\n t\n\n" + end + + test "aborts on what the Perl script dies on" do + assert_raise ArgumentError, ~r/must be a tag or a comment/, fn -> + normalize("\n<1/>\n") + end + + assert_raise ArgumentError, ~r/Only comments and CDATA sections/, fn -> + normalize("\n\n") + end + + assert_raise ArgumentError, fn -> normalize("") end + + assert_raise ArgumentError, fn -> + normalize("\n