<commit_before>#!/bin/bash
#
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Hacky, primitive testing: This runs the style plugin for a set of input files
# and compares the output with golden result files.

E_BADARGS=65
E_FAILEDTEST=1

failed_any_test=

# Prints usage information.
usage() {
  echo "Usage: $(basename "${0}")" \
    "<Path to the llvm build dir, usually Release+Asserts>"
  echo ""
  echo "  Runs all the libFindBadConstructs unit tests"
  echo ""
}

# Runs a single test case.
do_testcase() {
  local flags=""
  if [ -e "${3}" ]; then
    flags="$(cat "${3}")"
  fi
  local output="$("${CLANG_DIR}"/bin/clang -c -Wno-c++11-extensions \<commit_msg>clang plugin: Fix tests when running on OS X 10.9<commit_after>#!/bin/bash
#
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Hacky, primitive testing: This runs the style plugin for a set of input files
# and compares the output with golden result files.

E_BADARGS=65
E_FAILEDTEST=1

failed_any_test=

# Prints usage information.
usage() {
  echo "Usage: $(basename "${0}")" \
    "<Path to the llvm build dir, usually Release+Asserts>"
  echo ""
  echo "  Runs all the libFindBadConstructs unit tests"
  echo ""
}

# Runs a single test case.
do_testcase() {
  local flags=""
  if [ -e "${3}" ]; then
    flags="$(cat "${3}")"
  fi

  if [ "$(uname -s)" = "Darwin" ]; then
    flags="${flags} -isysroot $(xcrun --show-sdk-path) -stdlib=libstdc++"
  fi

  local output="$("${CLANG_DIR}"/bin/clang -c -Wno-c++11-extensions \
{'fraction_non_alphanumeric': 0.1361800346220427, 'fraction_numerical': 0.015579919215233698, 'mean_word_length': 3.7119565217391304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '799971', 'n_tokens_mistral': 603, 'n_tokens_neox': 580, 'n_words': 216}