summaryrefslogtreecommitdiffstats
path: root/fsa/src/alltest/fsamanager_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fsa/src/alltest/fsamanager_test.cpp')
-rw-r--r--fsa/src/alltest/fsamanager_test.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/fsa/src/alltest/fsamanager_test.cpp b/fsa/src/alltest/fsamanager_test.cpp
new file mode 100644
index 00000000000..7ca4a2d8e8a
--- /dev/null
+++ b/fsa/src/alltest/fsamanager_test.cpp
@@ -0,0 +1,25 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/fsa/fsa.h>
+#include <vespa/fsamanagers/fsamanager.h>
+
+#include <iostream>
+#include <string>
+#include <stdlib.h>
+
+using namespace fsa;
+
+int main(int argc, char** argv)
+{
+ if(argc<3){
+ std::cerr << "usage: fsamanager_test cache_dir fsa_file_or_url [fsa_file_or_url ...]\n";
+ exit(1);
+ }
+
+ FSAManager::instance().setCacheDir(argv[1]);
+
+ for(int i=2;i<argc;i++){
+ std::cerr << "Loading " << argv[i] << " ... ";
+ std::cerr << (FSAManager::instance().load(argv[i],argv[i]) ? "ok":"failed") << "\n";
+ }
+
+}