-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix UnicodeConversionError * Test unexpected inputs * Speed up compilation
- Loading branch information
1 parent
090c050
commit 325adb6
Showing
7 changed files
with
343 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
defmodule TestFiles do | ||
@types [:app, :archives, :audio, :books, :docs, :fonts, :images, :videos, :text] | ||
@paths Map.new(@types, &{&1, Path.wildcard("test/#{&1}/*")}) | ||
|
||
def list(opts \\ []) do | ||
requested_types = | ||
case List.wrap(opts[:only]) do | ||
[] -> @types -- List.wrap(opts[:except]) | ||
only -> only | ||
end | ||
|
||
Stream.flat_map(@paths, fn {type, paths} -> | ||
if type in requested_types do | ||
Enum.map(paths, &{Path.basename(&1), File.read!(&1)}) | ||
else | ||
[] | ||
end | ||
end) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<h1>My First Heading</h1> | ||
<p>My first paragraph.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
echo "Hello World!" |
Oops, something went wrong.