use diff -u in driver.sh test
this changs the add/delete indication from > > < to + + - (same as git diff)
This commit is contained in:
parent
645ef505da
commit
0d6eed1b1f
6
.github/driver.sh
vendored
6
.github/driver.sh
vendored
@ -24,18 +24,18 @@ unset CARGO_MANIFEST_DIR
|
|||||||
# FIXME: How to match the clippy invocation in compile-test.rs?
|
# FIXME: How to match the clippy invocation in compile-test.rs?
|
||||||
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/double_neg.rs 2> double_neg.stderr && exit 1
|
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/double_neg.rs 2> double_neg.stderr && exit 1
|
||||||
sed -e "s,tests/ui,\$DIR," -e "/= help/d" double_neg.stderr > normalized.stderr
|
sed -e "s,tests/ui,\$DIR," -e "/= help/d" double_neg.stderr > normalized.stderr
|
||||||
diff normalized.stderr tests/ui/double_neg.stderr
|
diff -u normalized.stderr tests/ui/double_neg.stderr
|
||||||
|
|
||||||
|
|
||||||
# make sure "clippy-driver --rustc --arg" and "rustc --arg" behave the same
|
# make sure "clippy-driver --rustc --arg" and "rustc --arg" behave the same
|
||||||
SYSROOT=`rustc --print sysroot`
|
SYSROOT=`rustc --print sysroot`
|
||||||
diff <(LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver --rustc --version --verbose) <(rustc --version --verbose)
|
diff -u <(LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver --rustc --version --verbose) <(rustc --version --verbose)
|
||||||
|
|
||||||
|
|
||||||
echo "fn main() {}" > target/driver_test.rs
|
echo "fn main() {}" > target/driver_test.rs
|
||||||
# we can't run 2 rustcs on the same file at the same time
|
# we can't run 2 rustcs on the same file at the same time
|
||||||
CLIPPY=`LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver ./target/driver_test.rs --rustc`
|
CLIPPY=`LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver ./target/driver_test.rs --rustc`
|
||||||
RUSTC=`rustc ./target/driver_test.rs`
|
RUSTC=`rustc ./target/driver_test.rs`
|
||||||
diff <($CLIPPY) <($RUSTC)
|
diff -u <($CLIPPY) <($RUSTC)
|
||||||
|
|
||||||
# TODO: CLIPPY_CONF_DIR / CARGO_MANIFEST_DIR
|
# TODO: CLIPPY_CONF_DIR / CARGO_MANIFEST_DIR
|
||||||
|
Loading…
Reference in New Issue
Block a user