
scope {
  assert s2.PathFinder;
  var pf = s2.PathFinder.new(), p2 = s2.PathFinder.new();
  assert 'PathFinder' === typename pf;
  assert pf inherits s2.PathFinder;
  pf.prefix = ['/etc', '/bin', '/usr/bin'];
  assert '/etc/hosts' === pf.search('hosts');
  assert pf.search('ls').indexOf('/ls') >= 0;
  assert undefined === pf.search('no-such-file-we-hope');

  pf.prefix = [/*'',*/ 'unit','.'];
  pf.suffix = [/*'',*/ '.s2'];
  assert pf.search('000-000-0empty');
  assert undefined === pf.search('no-such-script');
  assert 'string' === typename pf.search(__FILE);
  assert catch{
    s2.PathFinder.search('anything')
  }.message.indexOf('is not a PathFinder') > 0;
}