Skip to content

Commit 203b108

Browse files
authored
test fixes (#600)
* test fixes * filter mac osx until stable pulls right crate
1 parent 3c32c84 commit 203b108

File tree

15 files changed

+42
-41
lines changed

15 files changed

+42
-41
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ matrix:
2424
- rust: stable
2525
os: linux
2626
env: CONTENT_TESTS=1 CONTENT_TESTS_LINKS=1
27+
- rust: stable
28+
os: osx
2729

2830
addons:
2931
apt:

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ data-encoding = "2.1.0"
2323
env_logger = "0.5"
2424
error-chain = "0.12"
2525
flate2 = "1.0"
26-
glob = "0.2"
26+
glob = "0.3"
2727
image = "0.20"
2828
lazy_static = "1.0"
2929
log = "0.4"
@@ -63,9 +63,9 @@ walkdir = "2.0"
6363
syslog = "5.0"
6464

6565
[build-dependencies]
66-
skeptic = "0.13"
66+
skeptic = { git = 'https://github.com/andygauge/rust-skeptic'}
6767
walkdir = "2.0"
6868

6969
[dev-dependencies]
70-
skeptic = "0.13"
70+
skeptic = { git = 'https://github.com/andygauge/rust-skeptic'}
7171
walkdir = "2.0"

src/algorithms/randomness/rand-custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Randomly generates a tuple `(i32, bool, f64)` and variable of user defined type `Point`.
66
Implements the [`Distribution`] trait on type Point for [`Standard`] in order to allow random generation.
77

8-
```rust,edition2018,ignore
8+
```rust,edition2018
99
use rand::Rng;
1010
use rand::distributions::{Distribution, Standard};
1111

src/algorithms/randomness/rand-dist.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ An example using the [`Normal`] distribution is shown below.
1414

1515
```rust,edition2018,ignore
1616
use rand_distr::{Distribution, Normal, NormalError};
17+
use rand::thread_rng;
1718
1819
fn main() -> Result<(), NormalError> {
19-
let mut rng = rand::thread_rng();
20+
let mut rng = thread_rng();
2021
let normal = Normal::new(2.0, 3.0)?;
2122
let v = normal.sample(&mut rng);
2223
println!("{} is from a N(2, 9) distribution", v);

src/algorithms/randomness/rand-passwd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Randomly generates a string of given length ASCII characters in the range `A-Z,
66
a-z, 0-9`, with [`Alphanumeric`] sample.
77

8-
```rust,edition2018,ignore
8+
```rust,edition2018
99
use rand::{thread_rng, Rng};
1010
use rand::distributions::Alphanumeric;
1111

src/algorithms/randomness/rand-range.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Generates a random value within half-open `[0, 10)` range (not including `10`) with [`Rng::gen_range`].
66

7-
```rust,edition2018,ignore
7+
```rust,edition2018
88
use rand::Rng;
99
1010
fn main() {
@@ -18,7 +18,7 @@ fn main() {
1818
This has the same effect, but may be faster when repeatedly generating numbers
1919
in the same range.
2020

21-
```rust,edition2018,ignore
21+
```rust,edition2018
2222
2323
use rand::distributions::{Distribution, Uniform};
2424

src/concurrency/parallel/rayon-parallel-sort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ values in parallel. Although [multiple options]
99
exist to sort an enumerable data type, [`par_sort_unstable`]
1010
is usually faster than [stable sorting] algorithms.
1111

12-
```rust,edition2018,ignore
12+
```rust,edition2018
1313
1414
use rand::{Rng, thread_rng};
1515
use rand::distributions::Alphanumeric;

src/concurrency/parallel/rayon-thumbnails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rayon::prelude::*;
2929
3030
fn main() -> Result<()> {
3131
let options: MatchOptions = Default::default();
32-
let files: Vec<_> = glob_with("*.jpg", &options)?
32+
let files: Vec<_> = glob_with("*.jpg", options)?
3333
.filter_map(|x| x.ok())
3434
.collect();
3535

src/cryptography/encryption/pbkdf2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function [`pbkdf2::derive`]. Verifies the hash is correct with
99
[`SecureRandom::fill`], which fills the salt byte array with
1010
securely generated random numbers.
1111

12-
```rust,edition2018,ignore
12+
```rust,edition2018
1313
1414
use data_encoding::HEXUPPER;
1515
use ring::error::Unspecified;

src/development_tools/build_tools/cc-bundled-static.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ void greet(const char* name) {
5656
### `src/main.rs`
5757
5858
```rust,edition2018,ignore
59+
use error_chain::error_chain;
5960
use std::ffi::CString;
6061
use std::os::raw::c_char;
61-
#
62-
# error_chain! {
63-
# foreign_links {
64-
# NulError(::std::ffi::NulError);
65-
# Io(::std::io::Error);
66-
# }
67-
# }
68-
#
69-
# fn prompt(s: &str) -> Result<String> {
70-
# use std::io::Write;
71-
# print!("{}", s);
72-
# std::io::stdout().flush()?;
73-
# let mut input = String::new();
74-
# std::io::stdin().read_line(&mut input)?;
75-
# Ok(input.trim().to_string())
76-
# }
62+
63+
error_chain! {
64+
foreign_links {
65+
NulError(::std::ffi::NulError);
66+
Io(::std::io::Error);
67+
}
68+
}
69+
fn prompt(s: &str) -> Result<String> {
70+
use std::io::Write;
71+
print!("{}", s);
72+
std::io::stdout().flush()?;
73+
let mut input = String::new();
74+
std::io::stdin().read_line(&mut input)?;
75+
Ok(input.trim().to_string())
76+
}
7777
7878
extern {
7979
fn hello();

0 commit comments

Comments
 (0)