Skip to content

Commit a13c70b

Browse files
author
Paolo Tranquilli
committed
Rust: add integration test for cargo options
1 parent b9ea78f commit a13c70b

18 files changed

+109
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[workspace]
2+
[package]
3+
name = "options"
4+
version = "0.1.0"
5+
edition = "2021"
6+
7+
[features]
8+
foo = []
9+
bar = []
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| src/arch.rs:7:1:8:13 | macos |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| src/arch.rs:1:1:2:13 | linux |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| src/arch.rs:4:1:5:15 | windows |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import rust
2+
3+
from Function f
4+
where f.getLocation().getFile().getBaseName() = "arch.rs" and f.hasExtendedCanonicalPath()
5+
select f
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| src/cfg.rs:7:1:8:19 | cfg_no_flag |
2+
| src/cfg.rs:10:1:11:18 | cfg_no_key |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| src/cfg.rs:1:1:2:16 | cfg_flag |
2+
| src/cfg.rs:4:1:5:15 | cfg_key |
3+
| src/cfg.rs:13:1:14:15 | no_test |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import rust
2+
3+
from Function f
4+
where f.getLocation().getFile().getBaseName() = "cfg.rs" and f.hasExtendedCanonicalPath()
5+
select f
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| src/features.rs:1:1:2:11 | foo |
2+
| src/features.rs:4:1:5:11 | bar |
3+
| src/features.rs:7:1:7:14 | always |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| src/features.rs:4:1:5:11 | bar |
2+
| src/features.rs:7:1:7:14 | always |

0 commit comments

Comments
 (0)