"SimplexLink 2" "SimplexLink 3"

This commit is contained in:
pdavidow
2023-08-16 10:25:19 -04:00
parent bb8a9f4b1e
commit a9048e7270
+68
View File
@@ -273,6 +273,74 @@ formattedEditedTextTests = describe "show edits" do
}
]
it "SimplexLink 2" do
findDiffs
(LeftSide $ S.fromList
[ FormattedChar '>' $ Just $ SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/2/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host1", "host2", "host3"]}
])
(RightSide $ S.fromList
[ FormattedChar '>' $ Just SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/3/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host1", "host2", "host3"]
}
])
`shouldBe` S.fromList
[ DiffedChar
(FormattedChar '>' $ Just SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/2/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host1", "host2", "host3"]
}
) $
UnchangedChar $ ChangedToFormat $ Just SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/3/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host1", "host2", "host3"]
}
]
it "SimplexLink 3" do
findDiffs
(LeftSide $ S.fromList
[ FormattedChar '>' $ Just $ SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/2/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host1", "host2", "host3"]}
])
(RightSide $ S.fromList
[ FormattedChar '>' $ Just SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/2/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host0", "host2", "host3"]
}
])
`shouldBe` S.fromList
[ DiffedChar
(FormattedChar '>' $ Just SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/2/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host1", "host2", "host3"]
}
) $
UnchangedChar $ ChangedToFormat $ Just SimplexLink
{ linkType = XLContact
, simplexUri = "https://api.twitter.com/2/tweets/:id"
, trustedUri = True
, smpHosts = NE.fromList ["host0", "host2", "host3"]
}
]
it "findPlainDiffs 1" do
findPlainDiffs
(LeftSide "https://api.twitter.com/2/tweets/:id")