mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
DFS and Brother120 can now list files (more or less).
This commit is contained in:
@@ -32,6 +32,7 @@ $(call declare-test,kryoflux)
|
||||
$(call declare-test,ldbs)
|
||||
$(call declare-test,proto)
|
||||
$(call declare-test,utils)
|
||||
$(call declare-test,vfs)
|
||||
|
||||
$(call use-library, $(OBJDIR)/tests/agg.exe, $(OBJDIR)/tests/agg.o, AGG)
|
||||
$(call use-library, $(OBJDIR)/tests/agg.exe, $(OBJDIR)/tests/agg.o, STB)
|
||||
|
||||
22
tests/vfs.cc
Normal file
22
tests/vfs.cc
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "globals.h"
|
||||
#include "lib/vfs/vfs.h"
|
||||
#include "snowhouse/snowhouse.h"
|
||||
|
||||
using namespace snowhouse;
|
||||
|
||||
static void testPathParsing()
|
||||
{
|
||||
AssertThat(parsePath(""), Equals(std::vector<std::string>{}));
|
||||
AssertThat(parsePath("/"), Equals(std::vector<std::string>{}));
|
||||
AssertThat(parsePath("one"), Equals(std::vector<std::string>{ "one" }));
|
||||
AssertThat(parsePath("one/two"), Equals(std::vector<std::string>{ "one", "two" }));
|
||||
AssertThat(parsePath("/one/two"), Equals(std::vector<std::string>{ "one", "two" }));
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
testPathParsing();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user