Skip to content

Commit

Permalink
Add test for crate filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 28, 2018
1 parent dd717de commit 8062c7a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/rustdoc-js/filter-crate.js
@@ -0,0 +1,20 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// should-fail

const QUERY = 'string';
const FILTER_CRATE = 'core';

const EXPECTED = {
'others': [
{ 'path': 'std::collections', 'name': 'VecDeque' },
],
};
1 change: 1 addition & 0 deletions src/tools/rustdoc-js/tester.js
Expand Up @@ -259,6 +259,7 @@ function main(argv) {
'exports.QUERY = QUERY;exports.EXPECTED = EXPECTED;');
const expected = loadedFile.EXPECTED;
const query = loadedFile.QUERY;
const filter_crate = loadedFile.FILTER_CRATE;
const ignore_order = loadedFile.ignore_order;
const exact_check = loadedFile.exact_check;
const should_fail = loadedFile.should_fail;
Expand Down

0 comments on commit 8062c7a

Please sign in to comment.