Add rustdoc-js tester should-fail option
This commit is contained in:
parent
e28502edca
commit
1fcce48451
3 changed files with 46 additions and 1 deletions
20
src/test/rustdoc-js/keyword.js
Normal file
20
src/test/rustdoc-js/keyword.js
Normal file
|
|
@ -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.
|
||||
|
||||
// ignore-order
|
||||
|
||||
const QUERY = 'fn';
|
||||
|
||||
const EXPECTED = {
|
||||
'others': [
|
||||
{ 'path': 'std', 'name': 'fn', ty: 15 }, // 15 is for primitive types
|
||||
{ 'path': 'std', 'name': 'fn', ty: 21 }, // 21 is for keywords
|
||||
],
|
||||
};
|
||||
19
src/test/rustdoc-js/should-fail.js
Normal file
19
src/test/rustdoc-js/should-fail.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// 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 = 'fn';
|
||||
|
||||
const EXPECTED = {
|
||||
'others': [
|
||||
{ 'path': 'std', 'name': 'fn', ty: 14 },
|
||||
],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue