blob: 7ca4a2d8e8a6f696c2c3e405f4b75637e9eaae5b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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";
}
}
|