From a5126f2cc044c20de1200dd2fe8886754f513041 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sun, 18 Dec 2016 12:11:48 -0800 Subject: [PATCH 1/2] Fix idna tests to ignore validity criteria 2, run on travis --- .travis.yml | 4 +++- idna/tests/uts46.rs | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 810995df..66300e1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ rust: - nightly - beta - stable -script: make test +script: + - make test + - cd idna && cargo test notifications: webhooks: http://build.servo.org:54856/travis diff --git a/idna/tests/uts46.rs b/idna/tests/uts46.rs index f660559f..ddc8af98 100644 --- a/idna/tests/uts46.rs +++ b/idna/tests/uts46.rs @@ -56,6 +56,13 @@ pub fn collect_tests(add_test: &mut F) { // for these contexts return; } + if to_ascii == "[V2]" { + // Everybody ignores V2 + // https://github.com/servo/rust-url/pull/240 + // https://github.com/whatwg/url/issues/53#issuecomment-181528158 + // http://www.unicode.org/review/pri317/ + return; + } let res = result.ok(); assert!(res == None, "Expected error. result: {} | original: {} | source: {}", res.unwrap(), original, source); From 191e11bca95f5ef0897007bfea1d2a55d1ff6104 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 19 Dec 2016 18:22:51 +0100 Subject: [PATCH 2/2] Make idna and url share a Cargo worksace. --- .travis.yml | 4 +--- Cargo.toml | 3 +++ Makefile | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66300e1c..810995df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ rust: - nightly - beta - stable -script: - - make test - - cd idna && cargo test +script: make test notifications: webhooks: http://build.servo.org:54856/travis diff --git a/Cargo.toml b/Cargo.toml index d0b4d573..5ac4c7c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,9 @@ readme = "README.md" keywords = ["url", "parser"] license = "MIT/Apache-2.0" +[workspace] +members = [".", "idna"] + [[test]] name = "unit" diff --git a/Makefile b/Makefile index c6f1ff0c..c9592e73 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ test: cargo test --features "query_encoding serde rustc-serialize" [ x$$TRAVIS_RUST_VERSION != xnightly ] || cargo test --features heapsize + (cd idna && cargo test) .PHONY: test