Spaces:
Paused
Paused
OpenClawBot / apps /shared /OpenClawKit /Tests /OpenClawKitTests /ChatMarkdownPreprocessorTests.swift
Download apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatMarkdownPreprocessorTests.swift from nikhtu10/OpenClawBot: direct link, hf CLI and curl.
- Browser
- Download file 610 Bytes
-
https://huggingface.co/spaces/nikhtu10/OpenClawBot/resolve/main/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatMarkdownPreprocessorTests.swift
- Command line
-
hf download hf://spaces/nikhtu10/OpenClawBot/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatMarkdownPreprocessorTests.swift
-
curl -L -o ChatMarkdownPreprocessorTests.swift https://huggingface.co/spaces/nikhtu10/OpenClawBot/resolve/main/apps/shared/OpenClawKit/Tests/OpenClawKitTests/ChatMarkdownPreprocessorTests.swift
610 Bytes
| import Testing | |
| @testable import OpenClawChatUI | |
| ("ChatMarkdownPreprocessor") | |
| struct ChatMarkdownPreprocessorTests { | |
| func extractsDataURLImages() { | |
| let base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIHWP4////GQAJ+wP/2hN8NwAAAABJRU5ErkJggg==" | |
| let markdown = """ | |
| Hello | |
| ) | |
| """ | |
| let result = ChatMarkdownPreprocessor.preprocess(markdown: markdown) | |
| #expect(result.cleaned == "Hello") | |
| #expect(result.images.count == 1) | |
| #expect(result.images.first?.image != nil) | |
| } | |
| } | |