test_filenames.cpp File Reference

Tester that tries to feed a lot of possible characters as filenames into the makefilelib, make, and the filesystem. More...

#include "char_type.h"
#include "Comment.h"
#include "Variable.h"
#include "VariableDef.h"
#include "VariableRef.h"
#include "MakefileItem.h"
#include "Makefile.h"
#include "AutoVariable.h"
#include "Newline.h"
#include "Rule.h"
#include "Conditional.h"
#include "StringAdapter.h"
#include "test_util.h"
#include <iostream>
#include <vector>

Include dependency graph for test_filenames.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define START   0x20

Functions

void printchars (ostream &out, wchar_t limit)
 Prints the tested characters.
std::vector< pathcreatefiles_direct (const path dir, uchar_type limit)
 Tries to create files with names from 0x20 to limit using boost::filesystem.
std::vector< pathcreatefiles_make (const path dir, uchar_type limit)
 Tries to create files with names from 0x20 to limit by calling make.
int cleandir (path dir)
 Removes and recreates the output directories.
void printmiss (std::vector< path >::iterator start, std::vector< path >::iterator end)
int main (int argc, char *argv[])

Variables

ostreamcout = std::cout
ostreamcerr = std::cerr


Detailed Description

Tester that tries to feed a lot of possible characters as filenames into the makefilelib, make, and the filesystem.

Created on: Jul 16, 2010

Author:
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>

Definition in file test_filenames.cpp.


Define Documentation

#define START   0x20
 

Definition at line 58 of file test_filenames.cpp.

Referenced by main().


Function Documentation

int cleandir path  dir  ) 
 

Removes and recreates the output directories.

Parameters:
dir 
Returns:
0 on success, 1 on error.

Definition at line 159 of file test_filenames.cpp.

References cerr, and cstr.

Referenced by main().

std::vector<path> createfiles_direct const path  dir,
uchar_type  limit
 

Tries to create files with names from 0x20 to limit using boost::filesystem.

Parameters:
dir 
limit Upper limit for filenames
Returns:
Filenames that couldn't be found after creation.

Definition at line 80 of file test_filenames.cpp.

References makefile::char_type, cstr, makefile::ofstream, and makefile::path.

Referenced by main().

std::vector<path> createfiles_make const path  dir,
uchar_type  limit
 

Tries to create files with names from 0x20 to limit by calling make.

It first writes a makefile of this structure:

FILENAME=X.1

all :
@touch $(FILENAME)
Afterwards make is called with system() and creates the file by executing touch.

Parameters:
dir 
limit Upper limit for filenames
Returns:
Filenames that couldn't be found after creation.

Definition at line 111 of file test_filenames.cpp.

References makefile::MakefileItem::add(), makefile::Rule::addCommand(), makefile::Rule::addTarget(), makefile::char_type, cstr, makefile::tester::exec_make(), makefile::Variable::getDef(), makefile::Variable::getRef(), makefile::path, makefile::string, and makefile::VariableRef::toString().

Referenced by main().

int main int  argc,
char *  argv[]
 

Definition at line 182 of file test_filenames.cpp.

References cleandir(), cout, createfiles_direct(), createfiles_make(), cstr, makefile::path, printmiss(), START, and makefile::uchar_type.

void printchars ostream out,
wchar_t  limit
 

Prints the tested characters.

Parameters:
out 
limit 

Definition at line 65 of file test_filenames.cpp.

References makefile::char_type, and out.

void printmiss std::vector< path >::iterator  start,
std::vector< path >::iterator  end
 

Definition at line 171 of file test_filenames.cpp.

References cout, cstr, and makefile::string.

Referenced by main().


Variable Documentation

ostream& cerr = std::cerr
 

Definition at line 55 of file test_filenames.cpp.

Referenced by checkFramebufferStatus(), checkGLErrors(), cleandir(), compileGLSL(), RunStitchPanel::DetectProject(), celeste::FileCreateError(), celeste::FileOpenError(), celeste::GaborJet::Filter(), getPTLensCoef(), initGPU(), LoadLensParametersChoose(), PanoDetector::loadProject(), main(), main2(), iCPApp::OnRun(), OptimData::OptimData(), parseOptions(), parseOptions_advanced(), parseOptions_save(), processImg(), processPTO(), celeste::PGMImage::Read(), RunStitchPanel::StitchProject(), UnLinkVars(), UpdateSingleVar(), usage(), work_on_triplets(), and PanoDetector::writeOutput().

ostream& cout = std::cout
 

Definition at line 54 of file test_filenames.cpp.

Referenced by autoCrop(), convert_file(), createCtrlPoints(), deghosting::Khan< PixelType >::createWeightMasks(), MyExecPanel::ExecWithRedirect(), celeste::GetStreamDefaults(), initGPU(), Batch::ListBatch(), PanoDetector::LoadSVMModel(), celeste::loadSVMmodel(), main(), main2(), CPEditorPanel::OnCelesteButton(), stitchApp::OnInit(), iCPApp::OnRun(), parseOptions(), celeste::prepareCelesteImage(), PanoDetector::printDetails(), PanoDetector::printFilenames(), printInfoLog(), printmiss(), printUsage(), PanoDetector::run(), SetGeometricControlPointsOverlap(), SetGeometricControlPointsUnconnected(), HuginBase::ImageCache::softFlush(), vigra_ext::transformImageGPUIntern(), UpdateSingleVar(), MyOutput::usage(), usage(), MyOutput::version(), weightedAverageOfImageFiles(), and work_on_triplets().


Generated on Tue Sep 16 01:25:43 2014 for Hugintrunk by  doxygen 1.3.9.1