Skip to content

Commit

Permalink
'correct parse_linux_dev to parse_dev in the parser test module'
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdalrahman Mursi committed Dec 8, 2023
1 parent 6b00dff commit c63b8ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions parser/src/cfg/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1211,10 +1211,10 @@ fn parse_device_paths() {

#[test]
#[cfg(any(target_os = "linux", target_os = "unknown"))]
fn test_parse_linux_dev() {
fn test_parse_dev() {
// The old colon separated devices format
assert_eq!(
parse_linux_dev(&SExpr::Atom(Spanned {
parse_dev(&SExpr::Atom(Spanned {
t: "\"Keyboard2:Input Device 1:pci-0000\\:00\\:14.0-usb-0\\:1\\:1.0-event\""
.to_string(),
span: Span::default(),
Expand All @@ -1226,15 +1226,15 @@ fn test_parse_linux_dev() {
"pci-0000:00:14.0-usb-0:1:1.0-event"
]
);
parse_linux_dev(&SExpr::Atom(Spanned {
parse_dev(&SExpr::Atom(Spanned {
t: "\"\"".to_string(),
span: Span::default(),
}))
.expect_err("'' is not a valid device name/path, this should fail");

// The new device list format
assert_eq!(
parse_linux_dev(&SExpr::List(Spanned {
parse_dev(&SExpr::List(Spanned {
t: vec![
SExpr::Atom(Spanned {
t: "Keyboard2".to_string(),
Expand Down Expand Up @@ -1263,7 +1263,7 @@ fn test_parse_linux_dev() {
r"backslashes\do\not\escape\:\anything"
]
);
parse_linux_dev(&SExpr::List(Spanned {
parse_dev(&SExpr::List(Spanned {
t: vec![
SExpr::Atom(Spanned {
t: "Device1".to_string(),
Expand Down

0 comments on commit c63b8ff

Please sign in to comment.